Perceptron Struct Reference

Perceptron kernel $-\left|u-v\right|_2$. More...

#include <kernel.h>

Inheritance diagram for Perceptron:

Inheritance graph
[legend]
Collaboration diagram for Perceptron:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Perceptron ()
 Perceptron (std::istream &is)
virtual const id_tid () const
virtual Perceptroncreate () const
 Create a new object using the default constructor.
virtual Perceptronclone () 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_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

Protected Attributes

std::vector< REALx_norm2
 cached inner-product of data input

Detailed Description

Perceptron kernel $-\left|u-v\right|_2$.

Definition at line 121 of file kernel.h.


Constructor & Destructor Documentation

Perceptron  )  [inline]
 

Definition at line 126 of file kernel.h.

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

Definition at line 127 of file kernel.h.


Member Function Documentation

virtual Perceptron* 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.

Reimplemented in RBF.

Definition at line 131 of file kernel.h.

References Perceptron::Perceptron().

virtual Perceptron* 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.

Reimplemented in RBF.

Definition at line 130 of file kernel.h.

References Perceptron::Perceptron().

virtual const id_t& id  )  const [virtual]
 

Returns:
Class ID string (class name)

Implements Object.

Reimplemented in RBF.

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

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

Reimplemented from Kernel.

Reimplemented in RBF.

Definition at line 144 of file kernel.h.

References DOTPROD, and LearnModel::ptd.

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

The inner-product of two input vectors.

Implements Kernel.

Reimplemented in RBF.

Definition at line 133 of file kernel.h.

References lemga::kernel::norm_2().

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

Store a dataset in order to compute the kernel matrix.

Reimplemented from Kernel.

Definition at line 137 of file kernel.h.

References DOTPROD, and LearnModel::ptd.

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.

Reimplemented in RBF.

Definition at line 173 of file svm.cpp.


Member Data Documentation

std::vector<REAL> x_norm2 [protected]
 

cached inner-product of data input

Definition at line 123 of file kernel.h.


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