#include <LocallyWeightedDistribution.h>
Inheritance diagram for PLearn::LocallyWeightedDistribution:
Public Member Functions | |
LocallyWeightedDistribution () | |
virtual void | build () |
**** SUBCLASS WRITING: **** This method should be redefined in subclasses, to just call inherited::build() and then build_() | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
PLEARN_DECLARE_OBJECT (LocallyWeightedDistribution) | |
Declares name and deepCopy methods. | |
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)) | |
Public Attributes | |
Ker | weighting_kernel |
The kernel that will be used to locally weigh the samples. | |
PP< Distribution > | localdistr |
The distribution that will be trained with local weights. | |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Private Types | |
typedef Distribution | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. | |
Private Attributes | |
Vec | trainsample |
Global storage to save memory allocations. | |
Vec | weights |
Global storage to save memory allocations. |
|
Reimplemented from PLearn::Distribution. Definition at line 53 of file LocallyWeightedDistribution.h. |
|
Definition at line 46 of file LocallyWeightedDistribution.cc. |
|
**** SUBCLASS WRITING: **** This method should be redefined in subclasses, to just call inherited::build() and then build_()
Reimplemented from PLearn::Distribution. Definition at line 83 of file LocallyWeightedDistribution.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::Distribution. Definition at line 64 of file LocallyWeightedDistribution.cc. References localdistr, PLERROR, and PLearn::Learner::weightsize(). Referenced by build(). |
|
Declares this class' options.
Reimplemented from PLearn::Distribution. Definition at line 52 of file LocallyWeightedDistribution.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
return log of probability density log(p(x))
Reimplemented from PLearn::Distribution. Definition at line 113 of file LocallyWeightedDistribution.cc. References PLearn::columnmatrix(), PLearn::hconcat(), PLearn::Learner::inputsize(), PLearn::VMat::length(), localdistr, PLearn::TVec< T >::resize(), PLearn::VMat::subMatColumns(), PLearn::TVec< T >::subVec(), trainsample, PLearn::Vec, weighting_kernel, weights, PLearn::Learner::weightsize(), and x. |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Distribution. Definition at line 98 of file LocallyWeightedDistribution.cc. References PLERROR. |
|
Declares name and deepCopy methods.
|
|
trains the model
Reimplemented from PLearn::Distribution. Definition at line 90 of file LocallyWeightedDistribution.cc. References PLearn::Learner::inputsize(), PLERROR, PLearn::Learner::weightsize(), and PLearn::VMat::width(). |
|
The distribution that will be trained with local weights.
Definition at line 69 of file LocallyWeightedDistribution.h. Referenced by build_(), and log_density(). |
|
Global storage to save memory allocations.
Definition at line 56 of file LocallyWeightedDistribution.h. Referenced by log_density(). |
|
The kernel that will be used to locally weigh the samples.
Definition at line 66 of file LocallyWeightedDistribution.h. Referenced by log_density(). |
|
Global storage to save memory allocations.
Definition at line 56 of file LocallyWeightedDistribution.h. Referenced by log_density(). |