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

PLearn::GaussianDensityKernel Class Reference

#include <GaussianDensityKernel.h>

Inheritance diagram for PLearn::GaussianDensityKernel:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GaussianDensityKernel ()
 GaussianDensityKernel (real the_sigma)
 PLEARN_DECLARE_OBJECT (GaussianDensityKernel)
virtual real evaluate (const Vec &x1, const Vec &x2) const
 returns K(x1,x2)


Static Protected Member Functions

void declareOptions (OptionList &ol)
 redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)


Protected Attributes

real sigma

Private Types

typedef Kernel inherited

Detailed Description

Like GaussianKernel but the result is properly normalized as a density. returns exp(-0.5*norm_2(x1-x2)^2/sigma^2)/(sigma*sqrt(2pi))^n where n=x1.length().

Definition at line 58 of file GaussianDensityKernel.h.


Member Typedef Documentation

typedef Kernel PLearn::GaussianDensityKernel::inherited [private]
 

Reimplemented from PLearn::Kernel.

Definition at line 60 of file GaussianDensityKernel.h.


Constructor & Destructor Documentation

PLearn::GaussianDensityKernel::GaussianDensityKernel  )  [inline]
 

Definition at line 65 of file GaussianDensityKernel.h.

References sigma.

PLearn::GaussianDensityKernel::GaussianDensityKernel real  the_sigma  )  [inline]
 

Definition at line 67 of file GaussianDensityKernel.h.

References sigma.


Member Function Documentation

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

redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down)

ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); }

Reimplemented from PLearn::Kernel.

Definition at line 54 of file GaussianDensityKernel.cc.

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

real PLearn::GaussianDensityKernel::evaluate const Vec x1,
const Vec x2
const [virtual]
 

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 51 of file GaussianDensityKernel.cc.

References PLearn::exp(), PLearn::TVec< T >::length(), PLearn::log(), Log2Pi, PLearn::powdistance(), sigma, and PLearn::Vec.

PLearn::GaussianDensityKernel::PLEARN_DECLARE_OBJECT GaussianDensityKernel   ) 
 


Member Data Documentation

real PLearn::GaussianDensityKernel::sigma [protected]
 

Definition at line 63 of file GaussianDensityKernel.h.

Referenced by evaluate(), and GaussianDensityKernel().


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