Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::LocallyWeightedDistribution Class Reference

#include <LocallyWeightedDistribution.h>

Inheritance diagram for PLearn::LocallyWeightedDistribution:

Inheritance graph
[legend]
Collaboration diagram for PLearn::LocallyWeightedDistribution:

Collaboration graph
[legend]
List of all members.

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< Distributionlocaldistr
 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.


Member Typedef Documentation

typedef Distribution PLearn::LocallyWeightedDistribution::inherited [private]
 

Reimplemented from PLearn::Distribution.

Definition at line 53 of file LocallyWeightedDistribution.h.


Constructor & Destructor Documentation

PLearn::LocallyWeightedDistribution::LocallyWeightedDistribution  ) 
 

Definition at line 46 of file LocallyWeightedDistribution.cc.


Member Function Documentation

void PLearn::LocallyWeightedDistribution::build  )  [virtual]
 

**** 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_().

void PLearn::LocallyWeightedDistribution::build_  )  [private]
 

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().

void PLearn::LocallyWeightedDistribution::declareOptions OptionList ol  )  [static, protected]
 

Declares this class' options.

Reimplemented from PLearn::Distribution.

Definition at line 52 of file LocallyWeightedDistribution.cc.

References PLearn::declareOption(), and PLearn::OptionList.

double PLearn::LocallyWeightedDistribution::log_density const Vec x  )  const [virtual]
 

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.

void PLearn::LocallyWeightedDistribution::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::Distribution.

Definition at line 98 of file LocallyWeightedDistribution.cc.

References PLERROR.

PLearn::LocallyWeightedDistribution::PLEARN_DECLARE_OBJECT LocallyWeightedDistribution   ) 
 

Declares name and deepCopy methods.

void PLearn::LocallyWeightedDistribution::train VMat  training_set  )  [virtual]
 

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().


Member Data Documentation

PP<Distribution> PLearn::LocallyWeightedDistribution::localdistr
 

The distribution that will be trained with local weights.

Definition at line 69 of file LocallyWeightedDistribution.h.

Referenced by build_(), and log_density().

Vec PLearn::LocallyWeightedDistribution::trainsample [mutable, private]
 

Global storage to save memory allocations.

Definition at line 56 of file LocallyWeightedDistribution.h.

Referenced by log_density().

Ker PLearn::LocallyWeightedDistribution::weighting_kernel
 

The kernel that will be used to locally weigh the samples.

Definition at line 66 of file LocallyWeightedDistribution.h.

Referenced by log_density().

Vec PLearn::LocallyWeightedDistribution::weights [mutable, private]
 

Global storage to save memory allocations.

Definition at line 56 of file LocallyWeightedDistribution.h.

Referenced by log_density().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:27:17 2004 for PLearn by doxygen 1.3.7