Normalized version of a kernel function. More...
#include <shark/Models/Kernels/PointSetKernel.h>
Public Types | |
typedef base_type::BatchInputType | BatchInputType |
typedef base_type::ConstBatchInputReference | ConstBatchInputReference |
typedef base_type::ConstInputReference | ConstInputReference |
Public Types inherited from shark::IParameterizable<> | |
typedef RealVector | ParameterVectorType |
Public Member Functions | |
PointSetKernel (AbstractKernelFunction< InputType > *base) | |
std::string | name () const |
returns the name of the object More... | |
RealVector | parameterVector () const |
Return the parameter vector. More... | |
void | setParameterVector (RealVector const &newParameters) |
Set the parameter vector. More... | |
std::size_t | numberOfParameters () const |
Return the number of parameters. More... | |
boost::shared_ptr< State > | createState () const |
creates the internal state of the kernel More... | |
double | eval (ConstInputReference x1, ConstInputReference x2) const |
void | eval (ConstBatchInputReference const &batchX1, ConstBatchInputReference const &batchX2, RealMatrix &result, State &state) const |
void | eval (ConstBatchInputReference const &batchX1, ConstBatchInputReference const &batchX2, RealMatrix &result) const |
void | weightedParameterDerivative (ConstBatchInputReference const &batchX1, ConstBatchInputReference const &batchX2, RealMatrix const &coefficients, State const &state, RealVector &gradient) const |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
Public Member Functions inherited from shark::IParameterizable<> | |
virtual | ~IParameterizable () |
Public Member Functions inherited from shark::ISerializable | |
virtual | ~ISerializable () |
Virtual d'tor. More... | |
void | load (InArchive &archive, unsigned int version) |
Versioned loading of components, calls read(...). More... | |
void | save (OutArchive &archive, unsigned int version) const |
Versioned storing of components, calls write(...). More... | |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
AbstractKernelFunction< InputType > * | m_base |
kernel to normalize More... | |
Normalized version of a kernel function.
For a positive definite kernel k, the normalized kernel
\[ \tilde k(x, y) := \frac{k(x, y)}{\sqrt{k(x, x) \cdot k(y, y)}} \]
is again a positive definite kernel function.
Definition at line 50 of file PointSetKernel.h.
typedef base_type::BatchInputType shark::PointSetKernel< InputType >::BatchInputType |
Definition at line 67 of file PointSetKernel.h.
typedef base_type::ConstBatchInputReference shark::PointSetKernel< InputType >::ConstBatchInputReference |
Definition at line 68 of file PointSetKernel.h.
typedef base_type::ConstInputReference shark::PointSetKernel< InputType >::ConstInputReference |
Definition at line 69 of file PointSetKernel.h.
|
inline |
Definition at line 71 of file PointSetKernel.h.
References shark::AbstractKernelFunction< InputTypeT >::HAS_FIRST_PARAMETER_DERIVATIVE, shark::AbstractKernelFunction< InputTypeT >::hasFirstParameterDerivative(), shark::PointSetKernel< InputType >::m_base, shark::AbstractKernelFunction< Batch< InputType >::type >::m_features, and SHARK_ASSERT.
|
inlinevirtual |
creates the internal state of the kernel
Reimplemented from shark::AbstractKernelFunction< Batch< InputType >::type >.
Definition at line 93 of file PointSetKernel.h.
|
inlinevirtual |
evaluates \( k(x,y) \)
calculates
\[ \tilde k(x, y) := \frac{k(x, y)}{\sqrt{k(x, x) \cdot k(y, y)}} \]
Reimplemented from shark::AbstractKernelFunction< Batch< InputType >::type >.
Definition at line 102 of file PointSetKernel.h.
|
inline |
Definition at line 109 of file PointSetKernel.h.
References shark::batchSize(), shark::AbstractKernelFunction< InputTypeT >::eval(), shark::getBatchElement(), shark::PointSetKernel< InputType >::m_base, and shark::State::toState().
|
inline |
Definition at line 125 of file PointSetKernel.h.
References shark::batchSize(), shark::AbstractKernelFunction< InputTypeT >::eval(), shark::getBatchElement(), and shark::PointSetKernel< InputType >::m_base.
|
inlinevirtual |
returns the name of the object
Reimplemented from shark::INameable.
Definition at line 77 of file PointSetKernel.h.
References shark::PointSetKernel< InputType >::m_base, and shark::INameable::name().
|
inlinevirtual |
Return the number of parameters.
Reimplemented from shark::IParameterizable<>.
Definition at line 88 of file PointSetKernel.h.
References shark::PointSetKernel< InputType >::m_base, and shark::IParameterizable< VectorType >::numberOfParameters().
Referenced by shark::PointSetKernel< InputType >::weightedParameterDerivative().
|
inlinevirtual |
Return the parameter vector.
Reimplemented from shark::IParameterizable<>.
Definition at line 80 of file PointSetKernel.h.
References shark::PointSetKernel< InputType >::m_base, and shark::IParameterizable< VectorType >::parameterVector().
|
inlinevirtual |
Set the parameter vector.
Reimplemented from shark::IParameterizable<>.
Definition at line 84 of file PointSetKernel.h.
References shark::PointSetKernel< InputType >::m_base, and shark::IParameterizable< VectorType >::setParameterVector().
|
inline |
Definition at line 139 of file PointSetKernel.h.
References shark::batchSize(), shark::getBatchElement(), shark::PointSetKernel< InputType >::m_base, shark::PointSetKernel< InputType >::numberOfParameters(), shark::State::toState(), and shark::AbstractKernelFunction< InputTypeT >::weightedParameterDerivative().
|
protected |
kernel to normalize
Definition at line 167 of file PointSetKernel.h.
Referenced by shark::PointSetKernel< InputType >::eval(), shark::PointSetKernel< InputType >::name(), shark::PointSetKernel< InputType >::numberOfParameters(), shark::PointSetKernel< InputType >::parameterVector(), shark::PointSetKernel< InputType >::PointSetKernel(), shark::PointSetKernel< InputType >::setParameterVector(), and shark::PointSetKernel< InputType >::weightedParameterDerivative().