|
STK++ 0.9.13
|
The RationalQuadratic Kernel is a kernel of the form. More...
#include <STK_Kernel_RationalQuadratic.h>

Public Types | |
| typedef IKernelBase< Array > | Base |
| typedef Array::Type | Type |
Public Types inherited from STK::Kernel::IKernelBase< Array > | |
| typedef Array::Type | Type |
Public Member Functions | |
| RationalQuadratic (Real const &shift=1.) | |
| Default constructor with the width. | |
| RationalQuadratic (Array const *p_data, Real const &shift=1.) | |
| constructor with a constant pointer on the data set | |
| RationalQuadratic (Array const &data, Real const &shift=1.) | |
| constructor with a constant pointer on the data set | |
| template<class Derived > | |
| RationalQuadratic (Array const *p_data, ExprBase< Derived > const ¶m) | |
| constructor with an array of parameter. | |
| template<class Derived > | |
| RationalQuadratic (Array const &data, ExprBase< Derived > const ¶m) | |
| constructor with a constant pointer on the data set | |
| virtual | ~RationalQuadratic () |
| destructor | |
| 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 |
| compute the kernel value between two individuals | |
| virtual Real | value (Type const &v) const |
| compute the value of the kernel for the given value | |
Public Member Functions inherited from STK::Kernel::IKernelBase< Array > | |
| 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 |
Public Member Functions inherited from STK::Kernel::IKernel | |
| 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 |
Public Member Functions inherited from STK::IRunnerBase | |
| 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 | |
Public Attributes inherited from STK::Kernel::IKernelBase< Array > | |
| CSquareX | gram_ |
| the resulting gram_ matrix | |
Private Attributes | |
| Real | shift_ |
| shift of the kernel | |
Additional Inherited Members | |
Protected Member Functions inherited from STK::IRunnerBase | |
| IRunnerBase () | |
| default constructor | |
| IRunnerBase (IRunnerBase const &runner) | |
| copy constructor | |
| virtual | ~IRunnerBase () |
| destructor | |
| virtual void | update () |
| update the runner. | |
Protected Attributes inherited from STK::Kernel::IKernelBase< Array > | |
| Array const * | p_data_ |
| pointer on the data set | |
Protected Attributes inherited from STK::Kernel::IKernel | |
| CSquareX | gram_ |
| the resulting gram_ matrix | |
Protected Attributes inherited from STK::IRunnerBase | |
| String | msg_error_ |
| String with the last error message. | |
| bool | hasRun_ |
true if run has been used, false otherwise | |
The RationalQuadratic Kernel is a kernel of the form.
![\[
k(x,y) = 1 - \left( \frac{\|x-y\|^2}{\|x-y\|^2+h} \right)
\]](form_213.png)
where h represents the bandwidth of the kernel.
Definition at line 54 of file STK_Kernel_RationalQuadratic.h.
| typedef IKernelBase<Array> STK::Kernel::RationalQuadratic< Array >::Base |
Definition at line 57 of file STK_Kernel_RationalQuadratic.h.
| typedef Array::Type STK::Kernel::RationalQuadratic< Array >::Type |
Definition at line 58 of file STK_Kernel_RationalQuadratic.h.
|
inline |
Default constructor with the width.
| shift | the shift to use in the kernel |
Definition at line 66 of file STK_Kernel_RationalQuadratic.h.
Referenced by STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), and STK::Kernel::RationalQuadratic< Array >::RationalQuadratic().
|
inline |
constructor with a constant pointer on the data set
| p_data | a pointer on a data set that will be "kernelized" |
| shift | the shift to use in the kernel |
Definition at line 73 of file STK_Kernel_RationalQuadratic.h.
References STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), STK::Kernel::RationalQuadratic< Array >::shift(), STK::Kernel::RationalQuadratic< Array >::shift_, and STKDOMAIN_ERROR_1ARG.
|
inline |
constructor with a constant pointer on the data set
| data | a reference on a data set that will be "kernelized" |
| shift | the size of the windows to use in the kernel |
Definition at line 82 of file STK_Kernel_RationalQuadratic.h.
References STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), STK::Kernel::RationalQuadratic< Array >::shift(), STK::Kernel::RationalQuadratic< Array >::shift_, and STKDOMAIN_ERROR_1ARG.
|
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 92 of file STK_Kernel_RationalQuadratic.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 100 of file STK_Kernel_RationalQuadratic.h.
|
inlinevirtual |
|
virtual |
compute the kernel value between two individuals
| i,j | index of the two individuals to compare using the kernel metric |
Implements STK::Kernel::IKernel.
Definition at line 137 of file STK_Kernel_RationalQuadratic.h.
|
inlinevirtual |
virtual method.
| i | index of the individual |
Reimplemented from STK::Kernel::IKernel.
Definition at line 121 of file STK_Kernel_RationalQuadratic.h.
|
inline |
Set parameter using an array.
| param | array of parameter |
Definition at line 114 of file STK_Kernel_RationalQuadratic.h.
References STK::Kernel::RationalQuadratic< Array >::shift_.
|
inline |
set the shift of the kernel
Definition at line 109 of file STK_Kernel_RationalQuadratic.h.
References STK::Kernel::RationalQuadratic< Array >::shift(), and STK::Kernel::RationalQuadratic< Array >::shift_.
|
inline |
Definition at line 107 of file STK_Kernel_RationalQuadratic.h.
References STK::Kernel::RationalQuadratic< Array >::shift_.
Referenced by STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), and STK::Kernel::RationalQuadratic< Array >::setShift().
|
virtual |
compute the value of the kernel for the given value
| v | value |
Reimplemented from STK::Kernel::IKernelBase< Array >.
Definition at line 145 of file STK_Kernel_RationalQuadratic.h.
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 133 of file STK_Kernel_RationalQuadratic.h.
Referenced by STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), STK::Kernel::RationalQuadratic< Array >::RationalQuadratic(), STK::Kernel::RationalQuadratic< Array >::setParam(), STK::Kernel::RationalQuadratic< Array >::setShift(), and STK::Kernel::RationalQuadratic< Array >::shift().