Polynomial Struct Reference

Polynomial kernel $(\gamma*\left<u,v\right>+c_0)^d$. More...

#include <kernel.h>

Inheritance diagram for Polynomial:

Inheritance graph
[legend]
Collaboration diagram for Polynomial:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Polynomial (UINT d=3, REAL g=0.5, REAL c0=0)
 Polynomial (std::istream &is)
virtual const id_tid () const
virtual Polynomialcreate () const
 Create a new object using the default constructor.
virtual Polynomialclone () const
 Create a new object by replicating itself.
virtual REAL operator() (const Input &a, const Input &b) const
 The inner-product of two input vectors.
virtual void set_params (SVM_detail *) const

Public Attributes

UINT degree
REAL gamma
REAL coef0

Protected Member Functions

virtual bool serialize (std::ostream &, ver_list &) const
virtual bool unserialize (std::istream &, ver_list &, const id_t &=NIL_ID)

Detailed Description

Polynomial kernel $(\gamma*\left<u,v\right>+c_0)^d$.

Definition at line 83 of file kernel.h.


Constructor & Destructor Documentation

Polynomial UINT  d = 3,
REAL  g = 0.5,
REAL  c0 = 0
[inline]
 

Definition at line 87 of file kernel.h.

Polynomial std::istream &  is  )  [inline, explicit]
 

Definition at line 89 of file kernel.h.


Member Function Documentation

virtual Polynomial* clone  )  const [inline, virtual]
 

Create a new object by replicating itself.

Returns:
A pointer to the new copy.
The code for a derived class Derived is always
 return new Derived(*this); 
Though seemingly redundant, it helps to copy an object without knowing the real type of the object.
See also:
C++ FAQ Lite 20.6

Implements Kernel.

Definition at line 93 of file kernel.h.

virtual Polynomial* create  )  const [inline, virtual]
 

Create a new object using the default constructor.

The code for a derived class Derived is always

 return new Derived(); 

Implements Kernel.

Definition at line 92 of file kernel.h.

virtual const id_t& id  )  const [virtual]
 

Returns:
Class ID string (class name)

Implements Object.

virtual REAL operator() const Input a,
const Input b
const [inline, virtual]
 

The inner-product of two input vectors.

Implements Kernel.

Definition at line 95 of file kernel.h.

References DOTPROD.

bool serialize std::ostream &  ,
ver_list
const [protected, virtual]
 

Reimplemented from Kernel.

Definition at line 30 of file kernel.cpp.

References Polynomial::coef0, Polynomial::degree, Polynomial::gamma, and SERIALIZE_PARENT.

void set_params SVM_detail *   )  const [virtual]
 

In order to keep the SVM interface simple and avoid member functions specific to kernels (e.g., set_gamma()), we use Kernel to pass kernel parameters to SVM_detail.

Implements Kernel.

Definition at line 151 of file svm.cpp.

References Polynomial::coef0, Polynomial::degree, and Polynomial::gamma.

bool unserialize std::istream &  ,
ver_list ,
const id_t = NIL_ID
[protected, virtual]
 

Reimplemented from Kernel.

Definition at line 36 of file kernel.cpp.

References Polynomial::coef0, Polynomial::degree, Polynomial::gamma, Object::NIL_ID, and UNSERIALIZE_PARENT.


Member Data Documentation

REAL coef0
 

Definition at line 85 of file kernel.h.

Referenced by Polynomial::serialize(), Polynomial::set_params(), and Polynomial::unserialize().

UINT degree
 

Definition at line 84 of file kernel.h.

Referenced by Polynomial::serialize(), Polynomial::set_params(), and Polynomial::unserialize().

REAL gamma
 

Definition at line 85 of file kernel.h.

Referenced by Polynomial::serialize(), Polynomial::set_params(), and Polynomial::unserialize().


The documentation for this struct was generated from the following files:
Generated on Wed Nov 8 08:17:36 2006 for LEMGA by  doxygen 1.4.6