Determine the scaling factor of a ScaledKernel so that it has unit variance in feature space one on a given dataset. More...
#include <shark/Algorithms/Trainers/NormalizeKernelUnitVariance.h>
Public Member Functions | |
NormalizeKernelUnitVariance () | |
std::string | name () const |
From INameable: return the class name. More... | |
double | trace () const |
double | mean () const |
void | train (ScaledKernel< InputType > &kernel, UnlabeledData< InputType > const &input) |
Public Member Functions inherited from shark::AbstractUnsupervisedTrainer< ScaledKernel< InputType > > | |
virtual void | train (ModelType &model, const UnlabeledData< InputType > &inputset)=0 |
Core of the Trainer interface. More... | |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
virtual | ~ISerializable () |
Virtual d'tor. More... | |
virtual void | read (InArchive &archive) |
Read the component from the supplied archive. More... | |
virtual void | write (OutArchive &archive) const |
Write the component to the supplied archive. 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 | |
double | m_mean |
double | m_matrixTrace |
Additional Inherited Members | |
Public Types inherited from shark::AbstractUnsupervisedTrainer< ScaledKernel< InputType > > | |
typedef ScaledKernel< InputType > | ModelType |
typedef ScaledKernel< InputType > ::InputType | InputType |
Determine the scaling factor of a ScaledKernel so that it has unit variance in feature space one on a given dataset.
\[ \frac{1}{N}\sum_{i=1}^N k(x_i,x_i) - \frac{1}{N^2} \sum_{i,j=1}^N k(x_i,x_j) \]
Definition at line 61 of file NormalizeKernelUnitVariance.h.
|
inline |
Definition at line 65 of file NormalizeKernelUnitVariance.h.
|
inline |
Definition at line 75 of file NormalizeKernelUnitVariance.h.
References shark::NormalizeKernelUnitVariance< InputType >::m_mean.
Referenced by main().
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 69 of file NormalizeKernelUnitVariance.h.
|
inline |
Definition at line 72 of file NormalizeKernelUnitVariance.h.
References shark::NormalizeKernelUnitVariance< InputType >::m_matrixTrace.
Referenced by main().
|
inline |
Definition at line 79 of file NormalizeKernelUnitVariance.h.
References shark::ScaledKernel< InputType >::base(), shark::Data< Type >::batch(), shark::NormalizeKernelUnitVariance< InputType >::m_matrixTrace, shark::NormalizeKernelUnitVariance< InputType >::m_mean, shark::Data< Type >::numberOfBatches(), shark::Data< Type >::numberOfElements(), and SHARK_RUNTIME_CHECK.
Referenced by main().
|
protected |
Definition at line 113 of file NormalizeKernelUnitVariance.h.
Referenced by shark::NormalizeKernelUnitVariance< InputType >::trace(), and shark::NormalizeKernelUnitVariance< InputType >::train().
|
protected |
Definition at line 112 of file NormalizeKernelUnitVariance.h.
Referenced by shark::NormalizeKernelUnitVariance< InputType >::mean(), and shark::NormalizeKernelUnitVariance< InputType >::train().