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

PLearn::LogOfGaussianDensityKernel Class Reference

#include <LogOfGaussianDensityKernel.h>

Inheritance diagram for PLearn::LogOfGaussianDensityKernel:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LogOfGaussianDensityKernel ()
 LogOfGaussianDensityKernel (real the_sigma)
 PLEARN_DECLARE_OBJECT (LogOfGaussianDensityKernel)
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

computes the log of a GaussianDensityKernel logp = log[ exp(-0.5*norm_2(x1-x2)^2/sigma^2)/(sigma*sqrt(2pi))^n ] = log[ exp(-0.5*norm_2(x1-x2)^2/sigma^2)/exp(log[(sigma*sqrt(2pi))^n]) ] = log[ exp(-0.5*norm_2(x1-x2)^2/sigma^2)/exp(log[(2pi*sigma^2)^(n/2)]) ] = -0.5* [ norm_2(x1-x2)^2/sigma^2 + n*( log(2pi) + log(sigma^2) ) ] where n=x1.length().

Definition at line 60 of file LogOfGaussianDensityKernel.h.


Member Typedef Documentation

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

Reimplemented from PLearn::Kernel.

Definition at line 62 of file LogOfGaussianDensityKernel.h.


Constructor & Destructor Documentation

PLearn::LogOfGaussianDensityKernel::LogOfGaussianDensityKernel  )  [inline]
 

Definition at line 68 of file LogOfGaussianDensityKernel.h.

References sigma.

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

Definition at line 70 of file LogOfGaussianDensityKernel.h.

References sigma.


Member Function Documentation

void PLearn::LogOfGaussianDensityKernel::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 67 of file LogOfGaussianDensityKernel.cc.

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

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

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 51 of file LogOfGaussianDensityKernel.cc.

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

PLearn::LogOfGaussianDensityKernel::PLEARN_DECLARE_OBJECT LogOfGaussianDensityKernel   ) 
 


Member Data Documentation

real PLearn::LogOfGaussianDensityKernel::sigma [protected]
 

Definition at line 65 of file LogOfGaussianDensityKernel.h.

Referenced by evaluate(), and LogOfGaussianDensityKernel().


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