#include <PolynomialKernel.h>
Inheritance diagram for PLearn::PolynomialKernel:
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 |
Definition at line 54 of file PolynomialKernel.h.
|
Reimplemented from PLearn::Kernel. Definition at line 56 of file PolynomialKernel.h. |
|
Definition at line 62 of file PolynomialKernel.h. |
|
Definition at line 64 of file PolynomialKernel.h. |
|
recognized options are "n" and "beta"
Reimplemented from PLearn::Kernel. Definition at line 64 of file PolynomialKernel.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
returns K(x1,x2)
Implements PLearn::Kernel. Definition at line 52 of file PolynomialKernel.cc. References PLearn::dot(), evaluateFromDot(), and PLearn::Vec. |
|
returns evaluate(data(i),data(j))
Reimplemented from PLearn::Kernel. Definition at line 55 of file PolynomialKernel.cc. References evaluateFromDot(). |
|
returns evaluate(data(i),x)
Reimplemented from PLearn::Kernel. Definition at line 58 of file PolynomialKernel.cc. References evaluateFromDot(), and x. |
|
returns evaluate(x,data(i))
Reimplemented from PLearn::Kernel. Definition at line 61 of file PolynomialKernel.cc. References evaluateFromDot(), and x. |
|
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(). |
|
|
|
a normalization constant for numerical stability
Definition at line 60 of file PolynomialKernel.h. Referenced by evaluateFromDot(), and PolynomialKernel(). |
|
degree of polynomial
Definition at line 59 of file PolynomialKernel.h. Referenced by evaluateFromDot(), and PolynomialKernel(). |