Kernel Class Reference

The operator() gives the inner-product in the transformed space. More...

#include <kernel.h>

Inheritance diagram for Kernel:

Inheritance graph
[legend]
Collaboration diagram for Kernel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual Kernelcreate () const =0
 Create a new object using the default constructor.
virtual Kernelclone () const =0
 Create a new object by replicating itself.
virtual REAL operator() (const Input &, const Input &) const =0
 The inner-product of two input vectors.
virtual void set_data (const pDataSet &pd)
 Store a dataset in order to compute the kernel matrix.
virtual REAL matrix (UINT i, UINT j) const
 The inner-product of two stored inputs with index i and j.
virtual void set_params (SVM_detail *) const =0

Protected Member Functions

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

Protected Attributes

pDataSet ptd

Detailed Description

The operator() gives the inner-product in the transformed space.

Definition at line 43 of file kernel.h.


Member Function Documentation

virtual Kernel* clone  )  const [pure 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 Object.

Implemented in Linear, Polynomial, Stump, Perceptron, RBF, and Sigmoid.

Referenced by SVM::set_kernel().

virtual Kernel* create  )  const [pure virtual]
 

Create a new object using the default constructor.

The code for a derived class Derived is always

 return new Derived(); 

Implements Object.

Implemented in Linear, Polynomial, Stump, Perceptron, RBF, and Sigmoid.

virtual REAL matrix UINT  i,
UINT  j
const [inline, virtual]
 

The inner-product of two stored inputs with index i and j.

Reimplemented in Perceptron, and RBF.

Definition at line 53 of file kernel.h.

virtual REAL operator() const Input ,
const Input
const [pure virtual]
 

The inner-product of two input vectors.

Implemented in Linear, Polynomial, Stump, Perceptron, RBF, and Sigmoid.

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

Reimplemented in Polynomial, RBF, and Sigmoid.

Definition at line 18 of file kernel.cpp.

References SERIALIZE_PARENT.

virtual void set_data const pDataSet pd  )  [inline, virtual]
 

Store a dataset in order to compute the kernel matrix.

Reimplemented in Perceptron.

Definition at line 51 of file kernel.h.

virtual void set_params SVM_detail *   )  const [pure 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.

Implemented in Linear, Polynomial, Stump, Perceptron, RBF, and Sigmoid.

Referenced by SVM::set_kernel().

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

Reimplemented in Polynomial, RBF, and Sigmoid.

Definition at line 23 of file kernel.cpp.

References Object::NIL_ID, and UNSERIALIZE_PARENT.


Member Data Documentation

pDataSet ptd [protected]
 

Definition at line 62 of file kernel.h.


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