STK++ 0.9.13
|
The Polynomial Kernel is a kernel of the form. More...
#include <STK_Kernel_Polynomial.h>
Public Types | |
typedef IKernelBase< Array > | Base |
typedef Array::Type | Type |
![]() | |
typedef Array::Type | Type |
Public Member Functions | |
Polynomial (Real const &d=2., Real const &shift=0) | |
Default constructor with the degree and the shift. | |
Polynomial (Array const *p_data, Real const &d=2., Real const &shift=0) | |
constructor with a constant pointer on the data set | |
Polynomial (Array const &data, Real const &d=2., Real const &shift=0.) | |
constructor with a constant reference on the data set | |
template<class Derived > | |
Polynomial (Array const *p_data, ExprBase< Derived > const ¶m) | |
constructor with an array of parameter. | |
template<class Derived > | |
Polynomial (Array const &data, ExprBase< Derived > const ¶m) | |
constructor with a constant pointer on the data set | |
virtual | ~Polynomial () |
destructor | |
Real const & | degree () const |
void | setDegree (Real const &d) |
set the degree of the kernel | |
Real const & | shift () const |
void | setShift (Real const &shift) |
set the shift of the kernel | |
template<class Derived > | |
void | setParam (ExprBase< Derived > const ¶m) |
Set parameter using an array. | |
virtual Real | diag (int i) const |
virtual method. | |
virtual Real | comp (int i, int j) const |
virtual method implementation. | |
![]() | |
IKernelBase (Array const *p_data) | |
constructor with a constant pointer on the data set | |
IKernelBase (Array const &data) | |
constructor with a constant reference on the data set | |
IKernelBase (IKernelBase const &kernel) | |
copy constructor | |
virtual | ~IKernelBase () |
destructor | |
Array const * | p_data () const |
virtual bool | run () |
compute Gram matrix | |
virtual int | nbSample () const |
virtual int | nbVariable () const |
virtual Real | value (Type const &v) const |
compute the value of the kernel for the given value | |
![]() | |
IKernel () | |
default constructor | |
IKernel (IKernel const &kernel) | |
copy constructor | |
virtual | ~IKernel () |
destructor | |
CSquareX const & | k () const |
CSquareX const & | gram () const |
Real | kcomp (int i, int j) const |
Real | kdist (int i, int j) const |
Real | kdiag (int i) const |
Real | dist (int i, int j) const |
![]() | |
String const & | error () const |
get the last error message. | |
Public Attributes | |
Array const * | p_data_ |
pointer on the data set | |
CSquareX | gram_ |
the resulting gram_ matrix | |
![]() | |
CSquareX | gram_ |
the resulting gram_ matrix | |
Private Attributes | |
Real | d_ |
degree of the kernel | |
Real | shift_ |
shift of the kernel | |
Additional Inherited Members | |
![]() | |
IRunnerBase () | |
default constructor | |
IRunnerBase (IRunnerBase const &runner) | |
copy constructor | |
virtual | ~IRunnerBase () |
destructor | |
virtual void | update () |
update the runner. | |
![]() | |
Array const * | p_data_ |
pointer on the data set | |
![]() | |
CSquareX | gram_ |
the resulting gram_ matrix | |
![]() | |
String | msg_error_ |
String with the last error message. | |
bool | hasRun_ |
true if run has been used, false otherwise | |
The Polynomial Kernel is a kernel of the form.
where c represents the shift of the kernel (default is 0) and d
represents the degree.
Definition at line 55 of file STK_Kernel_Polynomial.h.
typedef IKernelBase<Array> STK::Kernel::Polynomial< Array >::Base |
Definition at line 58 of file STK_Kernel_Polynomial.h.
typedef Array::Type STK::Kernel::Polynomial< Array >::Type |
Definition at line 59 of file STK_Kernel_Polynomial.h.
|
inline |
Default constructor with the degree and the shift.
d | degree of the polynomial |
shift | the shift to use in the kernel |
Definition at line 68 of file STK_Kernel_Polynomial.h.
Referenced by STK::Kernel::Polynomial< Array >::Polynomial(), and STK::Kernel::Polynomial< Array >::Polynomial().
|
inline |
constructor with a constant pointer on the data set
p_data | a pointer on a data set that will be "kernelized" |
d | degree of the polynomial |
shift | the shift to use in the kernel |
Definition at line 76 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::d_, STK::Kernel::Polynomial< Array >::Polynomial(), STK::Kernel::Polynomial< Array >::shift(), and STKDOMAIN_ERROR_2ARG.
|
inline |
constructor with a constant reference on the data set
data | a reference on a data set that will be "kernelized" |
d | degree of the polynomial |
shift | the shift to use in the kernel |
Definition at line 86 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::d_, STK::Kernel::Polynomial< Array >::Polynomial(), STK::Kernel::Polynomial< Array >::shift(), and STKDOMAIN_ERROR_2ARG.
|
inline |
constructor with an array of parameter.
p_data | a pointer on a data set that will be "kernelized" |
param | array of parameter |
Definition at line 96 of file STK_Kernel_Polynomial.h.
|
inline |
constructor with a constant pointer on the data set
data | a reference on a data set that will be "kernelized" |
param | array of parameter |
Definition at line 106 of file STK_Kernel_Polynomial.h.
|
inlinevirtual |
|
inlinevirtual |
virtual method implementation.
i,j | indexes of the individuals |
Implements STK::Kernel::IKernel.
Definition at line 160 of file STK_Kernel_Polynomial.h.
|
inline |
Definition at line 115 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::d_.
|
inlinevirtual |
virtual method.
i | index of the individual |
Reimplemented from STK::Kernel::IKernel.
Definition at line 154 of file STK_Kernel_Polynomial.h.
|
inline |
set the degree of the kernel
Definition at line 117 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::d_.
|
inline |
Set parameter using an array.
param | array of parameter |
Definition at line 126 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::d_, and STK::Kernel::Polynomial< Array >::shift_.
|
inline |
set the shift of the kernel
Definition at line 121 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::shift(), and STK::Kernel::Polynomial< Array >::shift_.
|
inline |
Definition at line 119 of file STK_Kernel_Polynomial.h.
References STK::Kernel::Polynomial< Array >::shift_.
Referenced by STK::Kernel::Polynomial< Array >::Polynomial(), STK::Kernel::Polynomial< Array >::Polynomial(), and STK::Kernel::Polynomial< Array >::setShift().
|
private |
degree of the kernel
Definition at line 144 of file STK_Kernel_Polynomial.h.
Referenced by STK::Kernel::Polynomial< Array >::degree(), STK::Kernel::Polynomial< Array >::Polynomial(), STK::Kernel::Polynomial< Array >::Polynomial(), STK::Kernel::Polynomial< Array >::setDegree(), and STK::Kernel::Polynomial< Array >::setParam().
the resulting gram_ matrix
Definition at line 53 of file STK_Kernel_IKernel.h.
Array const* STK::Kernel::IKernelBase< Array >::p_data_ |
pointer on the data set
Definition at line 90 of file STK_Kernel_IKernelBase.h.
|
private |
shift of the kernel
Definition at line 146 of file STK_Kernel_Polynomial.h.
Referenced by STK::Kernel::Polynomial< Array >::setParam(), STK::Kernel::Polynomial< Array >::setShift(), and STK::Kernel::Polynomial< Array >::shift().