#include <EmpiricalDistribution.h>
Inheritance diagram for PLearn::EmpiricalDistribution:


Public Member Functions | |
| EmpiricalDistribution () | |
| EmpiricalDistribution (int inputsize, bool random_sample_=true) | |
| PLEARN_DECLARE_OBJECT (EmpiricalDistribution) | |
| void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
| virtual void | train (VMat training_set) |
| trains the model | |
| virtual double | log_density (const Vec &x) const |
| return log of probability density log(p(x)) | |
| virtual double | survival_fn (const Vec &x) const |
| return survival fn = P(X>x) | |
| virtual double | cdf (const Vec &x) const |
| return survival fn = P(X<x) | |
| virtual Vec | expectation () const |
| return E[X] | |
| virtual Mat | variance () const |
| return Var[X] | |
| virtual void | generate (Vec &x) const |
| return a sample generated from the distribution. | |
Public Attributes | |
| bool | random_sample |
| int | length |
| int | current_sample_x |
| int | current_sample_y |
| bool | flip |
Protected Types | |
| typedef Distribution | inherited |
Static Protected Member Functions | |
| void | declareOptions (OptionList &ol) |
| Declares this class' options. | |
Protected Attributes | |
| VMat | data |
|
|
Reimplemented from PLearn::Distribution. Definition at line 48 of file EmpiricalDistribution.h. Referenced by EmpiricalDistribution(). |
|
|
Definition at line 54 of file EmpiricalDistribution.cc. References inherited, and PLearn::seed(). |
|
||||||||||||
|
Definition at line 61 of file EmpiricalDistribution.cc. References current_sample_x, current_sample_y, flip, and PLearn::seed(). |
|
|
return survival fn = P(X<x)
Reimplemented from PLearn::Distribution. Definition at line 111 of file EmpiricalDistribution.cc. References data, PLearn::VMat::length(), PLearn::VMat::width(), and x. |
|
|
Declares this class' options.
Reimplemented from PLearn::Distribution. Definition at line 73 of file EmpiricalDistribution.cc. References PLearn::OptionList. |
|
|
return E[X]
Reimplemented from PLearn::Distribution. Definition at line 128 of file EmpiricalDistribution.cc. References PLearn::computeMean(), data, and PLearn::mean(). |
|
|
return a sample generated from the distribution.
Reimplemented from PLearn::Distribution. Definition at line 145 of file EmpiricalDistribution.cc. References current_sample_x, current_sample_y, data, flip, length, random_sample, PLearn::uniform_multinomial_sample(), PLearn::VMat::width(), and x. |
|
|
return log of probability density log(p(x))
Reimplemented from PLearn::Distribution. Definition at line 88 of file EmpiricalDistribution.cc. References PLERROR, and PLearn::Vec. |
|
|
Does the necessary operations to transform a shallow copy (this) into a deep copy by deep-copying all the members that need to be. Typical implementation: void CLASS_OF_THIS::makeDeepCopyFromShallowCopy(CopiesMap& copies) { SUPERCLASS_OF_THIS::makeDeepCopyFromShallowCopy(copies); member_ptr = member_ptr->deepCopy(copies); member_smartptr = member_smartptr->deepCopy(copies); member_mat.makeDeepCopyFromShallowCopy(copies); member_vec.makeDeepCopyFromShallowCopy(copies); ... } Reimplemented from PLearn::Learner. Definition at line 47 of file EmpiricalDistribution.cc. References PLearn::CopiesMap, data, and PLearn::deepCopyField(). |
|
|
|
|
|
return survival fn = P(X>x)
Reimplemented from PLearn::Distribution. Definition at line 95 of file EmpiricalDistribution.cc. References data, PLearn::VMat::length(), PLearn::VMat::width(), and x. |
|
|
trains the model
Reimplemented from PLearn::Distribution. Definition at line 79 of file EmpiricalDistribution.cc. References data, PLearn::VMat::length(), length, PLERROR, PLearn::VMat::subMatColumns(), and PLearn::VMat::width(). |
|
|
return Var[X]
Reimplemented from PLearn::Distribution. Definition at line 135 of file EmpiricalDistribution.cc. References PLearn::computeMeanAndCovar(), data, PLearn::Mat, and PLearn::mean(). |
|
|
Definition at line 92 of file EmpiricalDistribution.h. Referenced by EmpiricalDistribution(), and generate(). |
|
|
Definition at line 93 of file EmpiricalDistribution.h. Referenced by EmpiricalDistribution(), and generate(). |
|
|
Definition at line 46 of file EmpiricalDistribution.h. Referenced by cdf(), expectation(), generate(), makeDeepCopyFromShallowCopy(), survival_fn(), train(), and variance(). |
|
|
Definition at line 94 of file EmpiricalDistribution.h. Referenced by EmpiricalDistribution(), and generate(). |
|
|
Definition at line 89 of file EmpiricalDistribution.h. Referenced by generate(), and train(). |
|
|
Definition at line 86 of file EmpiricalDistribution.h. Referenced by generate(). |
1.3.7