#include <shark/Models/Kernels/AbstractMetric.h>
Public Types | |
typedef InputTypeT | InputType |
Input type of the Kernel. More... | |
typedef Batch< InputTypeT >::type | BatchInputType |
batch input type of the kernel More... | |
typedef ConstProxyReference< InputType const >::type | ConstInputReference |
Const references to InputType. More... | |
typedef ConstProxyReference< BatchInputType const >::type | ConstBatchInputReference |
Const references to BatchInputType. More... | |
Public Types inherited from shark::IParameterizable<> | |
typedef RealVector | ParameterVectorType |
Public Member Functions | |
AbstractMetric () | |
virtual | ~AbstractMetric () |
virtual void | read (InArchive &archive) |
From ISerializable, reads a metric from an archive. More... | |
virtual void | write (OutArchive &archive) const |
From ISerializable, writes a metric to an archive. More... | |
virtual double | featureDistanceSqr (ConstInputReference x1, ConstInputReference x2) const =0 |
Computes the squared distance in the kernel induced feature space. More... | |
virtual RealMatrix | featureDistanceSqr (ConstBatchInputReference batchX1, ConstBatchInputReference batchX2) const =0 |
double | featureDistance (ConstInputReference x1, ConstInputReference x2) const |
Computes the distance in the kernel induced feature space. More... | |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
virtual std::string | name () const |
returns the name of the object More... | |
Public Member Functions inherited from shark::IParameterizable<> | |
virtual | ~IParameterizable () |
virtual ParameterVectorType | parameterVector () const |
Return the parameter vector. More... | |
virtual void | setParameterVector (ParameterVectorType const &newParameters) |
Set the parameter vector. More... | |
virtual std::size_t | numberOfParameters () const |
Return the number of parameters. More... | |
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 () | |
Definition at line 47 of file AbstractMetric.h.
typedef Batch<InputTypeT>::type shark::AbstractMetric< InputTypeT >::BatchInputType |
batch input type of the kernel
Definition at line 52 of file AbstractMetric.h.
typedef ConstProxyReference<BatchInputType const>::type shark::AbstractMetric< InputTypeT >::ConstBatchInputReference |
Const references to BatchInputType.
Definition at line 56 of file AbstractMetric.h.
typedef ConstProxyReference<InputType const>::type shark::AbstractMetric< InputTypeT >::ConstInputReference |
Const references to InputType.
Definition at line 54 of file AbstractMetric.h.
typedef InputTypeT shark::AbstractMetric< InputTypeT >::InputType |
Input type of the Kernel.
Definition at line 50 of file AbstractMetric.h.
|
inline |
Definition at line 58 of file AbstractMetric.h.
|
inlinevirtual |
Definition at line 59 of file AbstractMetric.h.
|
inline |
Computes the distance in the kernel induced feature space.
Definition at line 86 of file AbstractMetric.h.
|
pure virtual |
Computes the squared distance in the kernel induced feature space.
Implemented in shark::AbstractKernelFunction< InputTypeT >, and shark::AbstractKernelFunction< InputTypeT >.
Referenced by shark::AbstractMetric< MultiTaskSample< InputTypeT > >::featureDistance(), and shark::AbstractMetric< MultiTaskSample< InputTypeT > >::write().
|
pure virtual |
Implemented in shark::AbstractKernelFunction< InputTypeT >, and shark::AbstractKernelFunction< InputTypeT >.
|
inlinevirtual |
From ISerializable, reads a metric from an archive.
Reimplemented from shark::ISerializable.
Reimplemented in shark::WeightedSumKernel< InputType >, shark::PolynomialKernel< InputType >, shark::ARDKernelUnconstrained< InputType >, shark::GaussianTaskKernel< InputTypeT >, shark::MonomialKernel< InputType >, shark::ProductKernel< InputType >, shark::ProductKernel< MultiTaskSample< InputTypeT > >, shark::ScaledKernel< InputType >, shark::DiscreteKernel, shark::GaussianRbfKernel< InputType >, and shark::LinearKernel< InputType >.
Definition at line 62 of file AbstractMetric.h.
|
inlinevirtual |
From ISerializable, writes a metric to an archive.
The default implementation just saves the parameters.
Reimplemented from shark::ISerializable.
Reimplemented in shark::WeightedSumKernel< InputType >, shark::PolynomialKernel< InputType >, shark::ModelKernel< InputType >, shark::ARDKernelUnconstrained< InputType >, shark::GaussianTaskKernel< InputTypeT >, shark::MonomialKernel< InputType >, shark::ProductKernel< InputType >, shark::ProductKernel< MultiTaskSample< InputTypeT > >, shark::ScaledKernel< InputType >, shark::DiscreteKernel, shark::GaussianRbfKernel< InputType >, and shark::LinearKernel< InputType >.
Definition at line 71 of file AbstractMetric.h.