Kernelized mean-classifier. More...
#include <shark/Algorithms/Trainers/KernelMeanClassifier.h>
Inheritance diagram for shark::KernelMeanClassifier< InputType >:Public Member Functions | |
| KernelMeanClassifier (AbstractKernelFunction< InputType > *kernel) | |
| std::string | name () const |
| returns the name of the object More... | |
| void | train (KernelClassifier< InputType > &model, LabeledData< InputType, unsigned int > const &dataset) |
Public Member Functions inherited from shark::AbstractTrainer< KernelClassifier< InputType >, unsigned int > | |
| virtual void | train (ModelType &model, DatasetType const &dataset)=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 () | |
Public Attributes | |
| AbstractKernelFunction< InputType > * | mpe_kernel |
Additional Inherited Members | |
Public Types inherited from shark::AbstractTrainer< KernelClassifier< InputType >, unsigned int > | |
| typedef KernelClassifier< InputType > | ModelType |
| typedef ModelType::InputType | InputType |
| typedef unsigned int | LabelType |
| typedef LabeledData< InputType, LabelType > | DatasetType |
Kernelized mean-classifier.
Computes the mean of the training data in feature space for each class and assigns a new data point to the class with the nearest mean.
Definition at line 51 of file KernelMeanClassifier.h.
|
inline |
Definition at line 54 of file KernelMeanClassifier.h.
|
inlinevirtual |
returns the name of the object
Reimplemented from shark::INameable.
Definition at line 56 of file KernelMeanClassifier.h.
|
inline |
Definition at line 59 of file KernelMeanClassifier.h.
References shark::classSizes(), shark::ArgMaxConverter< KernelExpansion< InputType > >::decisionFunction(), shark::LabeledData< InputT, LabelT >::elements(), shark::AbstractKernelFunction< InputTypeT >::eval(), shark::LabeledData< InputT, LabelT >::inputs(), shark::KernelMeanClassifier< InputType >::mpe_kernel, shark::numberOfClasses(), shark::LabeledData< InputT, LabelT >::numberOfElements(), shark::ArgMaxConverter< KernelExpansion< InputType > >::setParameterVector(), SHARK_CHECK, and shark::sqr().
| AbstractKernelFunction<InputType>* shark::KernelMeanClassifier< InputType >::mpe_kernel |
Definition at line 102 of file KernelMeanClassifier.h.
Referenced by shark::KernelMeanClassifier< InputType >::train().