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>
Inheritance diagram for shark::NormalizeKernelUnitVariance< InputType >:Public Member Functions | |
| NormalizeKernelUnitVariance () | |
| std::string | name () const |
| From INameable: return the class name. | |
| double | trace () const |
| double | mean () const |
| void | train (ScaledKernel< InputType > &kernel, UnlabeledData< InputType > const &input) |
Public Member Functions inherited from shark::AbstractUnsupervisedTrainer< Model > | |
| virtual void | train (ModelType &model, DatasetType const &inputset)=0 |
| Core of the Trainer interface. | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. | |
| virtual void | read (InArchive &archive) |
| Read the component from the supplied archive. | |
| virtual void | write (OutArchive &archive) const |
| Write the component to the supplied archive. | |
| 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 () | |
Protected Attributes | |
| double | m_mean |
| double | m_matrixTrace |
Additional Inherited Members | |
Public Types inherited from shark::AbstractUnsupervisedTrainer< Model > | |
| typedef Model | ModelType |
| typedef Model::InputType | InputType |
| typedef UnlabeledData< InputType > | DatasetType |
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 60 of file NormalizeKernelUnitVariance.h.
|
inline |
Definition at line 64 of file NormalizeKernelUnitVariance.h.
|
inline |
Definition at line 74 of file NormalizeKernelUnitVariance.h.
References shark::NormalizeKernelUnitVariance< InputType >::m_mean.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 68 of file NormalizeKernelUnitVariance.h.
|
inline |
Definition at line 71 of file NormalizeKernelUnitVariance.h.
References shark::NormalizeKernelUnitVariance< InputType >::m_matrixTrace.
|
inline |
Definition at line 78 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(), shark::ScaledKernel< InputType >::setFactor(), SHARK_ASSERT, and SHARK_RUNTIME_CHECK.
Referenced by shark::exportKernelMatrix(), main(), and main().
|
protected |
Definition at line 112 of file NormalizeKernelUnitVariance.h.
Referenced by shark::NormalizeKernelUnitVariance< InputType >::trace(), and shark::NormalizeKernelUnitVariance< InputType >::train().
|
protected |
Definition at line 111 of file NormalizeKernelUnitVariance.h.
Referenced by shark::NormalizeKernelUnitVariance< InputType >::mean(), and shark::NormalizeKernelUnitVariance< InputType >::train().