00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00044
#include "UnconditionalDistribution.h"
00045
00046
namespace PLearn {
00047
using namespace std;
00048
00050
00052 UnconditionalDistribution::UnconditionalDistribution()
00053
00054 {
00055
00056
00057
00058
00059 }
00060
00061
PLEARN_IMPLEMENT_OBJECT(
UnconditionalDistribution,
00062
"This class is a simplified version of PDistribution for unconditional distributions.",
00063
"Its only goal is to hide the conditional side of PDistributions to make it simpler."
00064 );
00065
00067
00069 void UnconditionalDistribution::declareOptions(
OptionList& ol)
00070 {
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083 inherited::declareOptions(ol);
00084
00085
00086
00087
redeclareOption(ol,
"outputs_def", &PDistribution::outputs_def, OptionBase::buildoption,
00088
"Defines what will be given in output. This is a string where the characters\n"
00089
"have the following meaning:\n"
00090
"'l'-> log_density, 'd' -> density, 'c' -> cdf, 's' -> survival_fn,\n"
00091
"'e' -> expectation, 'v' -> variance.\n"
00092
"In lower case they give the value associated with a given observation.\n"
00093
"In upper case, a curve is evaluated at regular intervals and produced in\n"
00094
"output (as a histogram), only for 'L', 'D', 'C' and 'S'.\n"
00095
"The number of curve points is determined by the 'n_curve_points' option.\n"
00096
"Note that the upper case letters only work for SCALAR variables."
00097 );
00098
00099
redeclareOption(ol,
"conditional_flags", &UnconditionalDistribution::conditional_flags, OptionBase::nosave,
00100
"Unused in unconditional distributions.");
00101
00102
redeclareOption(ol,
"provide_input", &UnconditionalDistribution::provide_input, OptionBase::nosave,
00103
"Unused in unconditional distributions.");
00104
00105
redeclareOption(ol,
"cond_sort", &UnconditionalDistribution::cond_sort, OptionBase::nosave,
00106
"Unused in unconditional distributions.");
00107
00108
redeclareOption(ol,
"n_input", &UnconditionalDistribution::n_input, OptionBase::nosave,
00109
"Unused in unconditional distributions.");
00110
00111
redeclareOption(ol,
"n_target", &UnconditionalDistribution::n_target, OptionBase::nosave,
00112
"Unused in unconditional distributions.");
00113
00114
redeclareOption(ol,
"n_margin", &UnconditionalDistribution::n_margin, OptionBase::nosave,
00115
"Unused in unconditional distributions.");
00116
00117 }
00118
00120
00122 void UnconditionalDistribution::build()
00123 {
00124 inherited::build();
00125
build_();
00126 }
00127
00129
00131 void UnconditionalDistribution::build_()
00132 {
00133 }
00134
00136
00138 void UnconditionalDistribution::makeDeepCopyFromShallowCopy(map<const void*, void*>& copies)
00139 {
00140 inherited::makeDeepCopyFromShallowCopy(copies);
00141 }
00142
00144
00146 void UnconditionalDistribution::setInput(
const Vec& input)
const {
00147
PLERROR(
"setInput not implemented for UnconditionalDistribution");
00148 }
00149
00151
00153 void UnconditionalDistribution::updateFromConditionalSorting() {
00154
PLERROR(
"updateFromConditionalSorting not implemented for UnconditionalDistribution");
00155 }
00156
00157 }
00158