shark::AbstractMetric< InputTypeT > Class Template Referenceabstract

Base-class for metrics. More...

#include <shark/Models/Kernels/AbstractMetric.h>

+ Inheritance diagram for shark::AbstractMetric< InputTypeT >:

Public Types

typedef InputTypeT InputType
 Input type of the Kernel.
 
typedef Batch< InputTypeT >::type BatchInputType
 batch input type of the kernel
 
typedef ConstProxyReference< InputTypeconst >::type ConstInputReference
 Const references to InputType.
 
typedef ConstProxyReference< BatchInputTypeconst >::type ConstBatchInputReference
 Const references to BatchInputType.
 
- Public Types inherited from shark::IParameterizable< VectorType >
typedef VectorType ParameterVectorType
 

Public Member Functions

 AbstractMetric ()
 
virtual ~AbstractMetric ()
 
virtual void read (InArchive &archive)
 From ISerializable, reads a metric from an archive.
 
virtual void write (OutArchive &archive) const
 From ISerializable, writes a metric to an archive.
 
virtual double featureDistanceSqr (ConstInputReference x1, ConstInputReference x2) const =0
 Computes the squared distance in the kernel induced feature space.
 
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.
 
- Public Member Functions inherited from shark::INameable
virtual ~INameable ()
 
virtual std::string name () const
 returns the name of the object
 
- Public Member Functions inherited from shark::IParameterizable< VectorType >
virtual ~IParameterizable ()
 
virtual ParameterVectorType parameterVector () const
 Return the parameter vector.
 
virtual void setParameterVector (ParameterVectorType const &newParameters)
 Set the parameter vector.
 
virtual std::size_t numberOfParameters () const
 Return the number of parameters.
 
- Public Member Functions inherited from shark::ISerializable
virtual ~ISerializable ()
 Virtual d'tor.
 
void load (InArchive &archive, unsigned int version)
 Versioned loading of components, calls read(...).
 
void save (OutArchive &archive, unsigned int version) const
 Versioned storing of components, calls write(...).
 
 BOOST_SERIALIZATION_SPLIT_MEMBER ()
 

Detailed Description

template<class InputTypeT>
class shark::AbstractMetric< InputTypeT >

Base-class for metrics.

A metric is a distance measure between objects. All kernels in shark define metrics.

Definition at line 50 of file AbstractMetric.h.

Member Typedef Documentation

◆ BatchInputType

template<class InputTypeT >
typedef Batch<InputTypeT>::type shark::AbstractMetric< InputTypeT >::BatchInputType

batch input type of the kernel

Definition at line 55 of file AbstractMetric.h.

◆ ConstBatchInputReference

template<class InputTypeT >
typedef ConstProxyReference<BatchInputTypeconst>::type shark::AbstractMetric< InputTypeT >::ConstBatchInputReference

Const references to BatchInputType.

Definition at line 59 of file AbstractMetric.h.

◆ ConstInputReference

template<class InputTypeT >
typedef ConstProxyReference<InputTypeconst>::type shark::AbstractMetric< InputTypeT >::ConstInputReference

Const references to InputType.

Definition at line 57 of file AbstractMetric.h.

◆ InputType

template<class InputTypeT >
typedef InputTypeT shark::AbstractMetric< InputTypeT >::InputType

Input type of the Kernel.

Definition at line 53 of file AbstractMetric.h.

Constructor & Destructor Documentation

◆ AbstractMetric()

template<class InputTypeT >
shark::AbstractMetric< InputTypeT >::AbstractMetric ( )
inline

Definition at line 61 of file AbstractMetric.h.

◆ ~AbstractMetric()

template<class InputTypeT >
virtual shark::AbstractMetric< InputTypeT >::~AbstractMetric ( )
inlinevirtual

Definition at line 62 of file AbstractMetric.h.

Member Function Documentation

◆ featureDistance()

template<class InputTypeT >
double shark::AbstractMetric< InputTypeT >::featureDistance ( ConstInputReference  x1,
ConstInputReference  x2 
) const
inline

Computes the distance in the kernel induced feature space.

Definition at line 89 of file AbstractMetric.h.

References shark::AbstractMetric< InputTypeT >::featureDistanceSqr().

◆ featureDistanceSqr() [1/2]

template<class InputTypeT >
virtual RealMatrix shark::AbstractMetric< InputTypeT >::featureDistanceSqr ( ConstBatchInputReference  batchX1,
ConstBatchInputReference  batchX2 
) const
pure virtual

◆ featureDistanceSqr() [2/2]

template<class InputTypeT >
virtual double shark::AbstractMetric< InputTypeT >::featureDistanceSqr ( ConstInputReference  x1,
ConstInputReference  x2 
) const
pure virtual

◆ read()

◆ write()


The documentation for this class was generated from the following file: