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

PLearn::PolynomialKernel Class Reference

returns (beta*dot(x1,x2)+1)^n More...

#include <PolynomialKernel.h>

Inheritance diagram for PLearn::PolynomialKernel:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PolynomialKernel ()
 PolynomialKernel (int degree, real the_beta=1.0)
 PLEARN_DECLARE_OBJECT (PolynomialKernel)
real evaluateFromDot (real dot_product) const
virtual real evaluate (const Vec &x1, const Vec &x2) const
 returns K(x1,x2)

virtual real evaluate_i_j (int i, int j) const
 returns evaluate(data(i),data(j))

virtual real evaluate_i_x (int i, const Vec &x, real squared_norm_of_x=-1) const
 returns evaluate(data(i),x)

virtual real evaluate_x_i (const Vec &x, int i, real squared_norm_of_x=-1) const
 returns evaluate(x,data(i))


Public Attributes

int n
 degree of polynomial

real beta
 a normalization constant for numerical stability


Static Protected Member Functions

void declareOptions (OptionList &ol)
 recognized options are "n" and "beta"


Private Types

typedef Kernel inherited

Detailed Description

returns (beta*dot(x1,x2)+1)^n

Definition at line 54 of file PolynomialKernel.h.


Member Typedef Documentation

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

Reimplemented from PLearn::Kernel.

Definition at line 56 of file PolynomialKernel.h.


Constructor & Destructor Documentation

PLearn::PolynomialKernel::PolynomialKernel  )  [inline]
 

Definition at line 62 of file PolynomialKernel.h.

References beta, and n.

PLearn::PolynomialKernel::PolynomialKernel int  degree,
real  the_beta = 1.0
[inline]
 

Definition at line 64 of file PolynomialKernel.h.

References beta, and n.


Member Function Documentation

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

recognized options are "n" and "beta"

Reimplemented from PLearn::Kernel.

Definition at line 64 of file PolynomialKernel.cc.

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

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

returns K(x1,x2)

Implements PLearn::Kernel.

Definition at line 52 of file PolynomialKernel.cc.

References PLearn::dot(), evaluateFromDot(), and PLearn::Vec.

real PLearn::PolynomialKernel::evaluate_i_j int  i,
int  j
const [virtual]
 

returns evaluate(data(i),data(j))

Reimplemented from PLearn::Kernel.

Definition at line 55 of file PolynomialKernel.cc.

References evaluateFromDot().

real PLearn::PolynomialKernel::evaluate_i_x int  i,
const Vec x,
real  squared_norm_of_x = -1
const [virtual]
 

returns evaluate(data(i),x)

Reimplemented from PLearn::Kernel.

Definition at line 58 of file PolynomialKernel.cc.

References evaluateFromDot(), and x.

real PLearn::PolynomialKernel::evaluate_x_i const Vec x,
int  i,
real  squared_norm_of_x = -1
const [virtual]
 

returns evaluate(x,data(i))

Reimplemented from PLearn::Kernel.

Definition at line 61 of file PolynomialKernel.cc.

References evaluateFromDot(), and x.

real PLearn::PolynomialKernel::evaluateFromDot real  dot_product  )  const [inline]
 

Definition at line 69 of file PolynomialKernel.h.

References beta, PLearn::dot_product(), evaluateFromDot(), PLearn::ipow(), and n.

Referenced by evaluate(), evaluate_i_j(), evaluate_i_x(), evaluate_x_i(), and evaluateFromDot().

PLearn::PolynomialKernel::PLEARN_DECLARE_OBJECT PolynomialKernel   ) 
 


Member Data Documentation

real PLearn::PolynomialKernel::beta
 

a normalization constant for numerical stability

Definition at line 60 of file PolynomialKernel.h.

Referenced by evaluateFromDot(), and PolynomialKernel().

int PLearn::PolynomialKernel::n
 

degree of polynomial

Definition at line 59 of file PolynomialKernel.h.

Referenced by evaluateFromDot(), and PolynomialKernel().


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