|
STK++ 0.9.13
|
The Hamming Kernel is a kernel of the form. More...
#include <STK_Kernel_Hamming.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 | |
| Hamming (Array const *p_data, Real const &lambda=1.) | |
| constructor with a constant pointer on the data set | |
| Hamming (Array const &data, Real const &lambda=1.) | |
| constructor with a constant pointer on the data set | |
| template<class Derived > | |
| Hamming (Array const *p_data, ExprBase< Derived > const ¶m) | |
| constructor with an array of parameter. | |
| template<class Derived > | |
| Hamming (Array const &data, ExprBase< Derived > const ¶m) | |
| constructor with a constant pointer on the data set | |
| virtual | ~Hamming () |
| destructor | |
| Real const & | lambda () const |
| Stat::MultiFactor< Array > const & | factors () const |
| void | setLambda (Real const &lambda) |
| set the lambda 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. | |
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 |
| virtual Real | value (Type const &v) const |
| compute the value of the kernel for the given value | |
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 | |
Public Attributes inherited from STK::Kernel::IKernelBase< Array > | |
| CSquareX | gram_ |
| the resulting gram_ matrix | |
Private Member Functions | |
| void | computeDiagonalElement () |
| Compute the diagonal element of the kernel. | |
Private Attributes | |
| Real | lambda_ |
| lambda of the kernel | |
| Real | diagElt_ |
| diagonal element of the kernel | |
| Stat::MultiFactor< Array > | factors_ |
| factors of the values | |
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 Hamming Kernel is a kernel of the form.
![\[
k(x,y) = \sum_{u\in D^p} \prod_{j=1}^p \lambda^{\delta(u_j,x_j)}\lambda^{\delta(u_j,y_j)}
\]](form_203.png)
where 
Definition at line 60 of file STK_Kernel_Hamming.h.
| typedef IKernelBase<Array> STK::Kernel::Hamming< Array >::Base |
Definition at line 63 of file STK_Kernel_Hamming.h.
| typedef Array::Type STK::Kernel::Hamming< Array >::Type |
Definition at line 64 of file STK_Kernel_Hamming.h.
|
inline |
constructor with a constant pointer on the data set
| p_data | a pointer on a data set that will be "kernelized" |
| lambda | the size of the windows to use in the kernel |
Definition at line 73 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::computeDiagonalElement(), STK::Kernel::Hamming< Array >::factors_, STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::lambda(), STK::Kernel::IKernelBase< Array >::p_data(), and STKRUNTIME_ERROR_NO_ARG.
Referenced by STK::Kernel::Hamming< Array >::Hamming(), and STK::Kernel::Hamming< Array >::Hamming().
|
inline |
constructor with a constant pointer on the data set
| data | a reference on a data set that will be "kernelized" |
| lambda | the size of the windows to use in the kernel |
Definition at line 85 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::computeDiagonalElement(), STK::Kernel::Hamming< Array >::factors_, and STK::Kernel::IKernelBase< Array >::run().
|
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_Hamming.h.
References STK::Kernel::Hamming< Array >::computeDiagonalElement(), STK::Kernel::Hamming< Array >::factors_, STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::lambda(), STK::Kernel::IKernelBase< Array >::p_data(), and STKRUNTIME_ERROR_NO_ARG.
|
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 110 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::computeDiagonalElement(), STK::Kernel::Hamming< Array >::factors_, and STK::Kernel::IKernelBase< Array >::run().
|
inlinevirtual |
|
virtual |
virtual method implementation.
| i,j | indexes of the individuals |
Implements STK::Kernel::IKernel.
Definition at line 176 of file STK_Kernel_Hamming.h.
|
private |
Compute the diagonal element of the kernel.
Definition at line 165 of file STK_Kernel_Hamming.h.
Referenced by STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::setLambda(), and STK::Kernel::Hamming< Array >::setParam().
|
inlinevirtual |
virtual method.
| i | index of the individual |
Reimplemented from STK::Kernel::IKernel.
Definition at line 173 of file STK_Kernel_Hamming.h.
|
inline |
Definition at line 124 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::factors_.
|
inline |
Definition at line 122 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::lambda_.
Referenced by STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::Hamming(), and STK::Kernel::Hamming< Array >::setLambda().
|
inline |
set the lambda of the kernel
Definition at line 126 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::computeDiagonalElement(), STK::Kernel::Hamming< Array >::lambda(), and STK::Kernel::Hamming< Array >::lambda_.
|
inline |
Set parameter using an array.
| param | array of parameter |
Definition at line 135 of file STK_Kernel_Hamming.h.
References STK::Kernel::Hamming< Array >::computeDiagonalElement(), and STK::Kernel::Hamming< Array >::lambda_.
|
private |
diagonal element of the kernel
Definition at line 156 of file STK_Kernel_Hamming.h.
|
private |
factors of the values
Definition at line 158 of file STK_Kernel_Hamming.h.
Referenced by STK::Kernel::Hamming< Array >::factors(), STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::Hamming(), STK::Kernel::Hamming< Array >::Hamming(), and STK::Kernel::Hamming< Array >::Hamming().
|
private |
lambda of the kernel
Definition at line 154 of file STK_Kernel_Hamming.h.
Referenced by STK::Kernel::Hamming< Array >::lambda(), STK::Kernel::Hamming< Array >::setLambda(), and STK::Kernel::Hamming< Array >::setParam().
| Array const* STK::Kernel::IKernelBase< Array >::p_data_ |
pointer on the data set
Definition at line 90 of file STK_Kernel_IKernelBase.h.