shark::AbstractTrainer< Model, LabelTypeT > Class Template Referenceabstract

Superclass of supervised learning algorithms. More...

#include <shark/Algorithms/Trainers/AbstractTrainer.h>

+ Inheritance diagram for shark::AbstractTrainer< Model, LabelTypeT >:

Public Types

typedef Model ModelType
 
typedef ModelType::InputType InputType
 
typedef LabelTypeT LabelType
 
typedef LabeledData< InputType, LabelTypeDatasetType
 

Public Member Functions

virtual void train (ModelType &model, DatasetType const &dataset)=0
 Core of the Trainer interface. 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::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 ()
 

Detailed Description

template<class Model, class LabelTypeT = typename Model::OutputType>
class shark::AbstractTrainer< Model, LabelTypeT >

Superclass of supervised learning algorithms.

AbstractTrainer is the super class of all trainers, i.e., procedures for training or learning model parameters. It provides a single virtual function to train the model.
Note: Most learning algorithms of this type operate on a special model type, such as a linear model, a kernel expansion, etc. Thus, these algorithms should provide a specialized train method accepting only this model type. The virtual train method should be overriden with a method that checks the type of the model and calls the specialized train method.

Definition at line 64 of file AbstractTrainer.h.

Member Typedef Documentation

◆ DatasetType

template<class Model, class LabelTypeT = typename Model::OutputType>
typedef LabeledData<InputType, LabelType> shark::AbstractTrainer< Model, LabelTypeT >::DatasetType

Definition at line 70 of file AbstractTrainer.h.

◆ InputType

template<class Model, class LabelTypeT = typename Model::OutputType>
typedef ModelType::InputType shark::AbstractTrainer< Model, LabelTypeT >::InputType

Definition at line 68 of file AbstractTrainer.h.

◆ LabelType

template<class Model, class LabelTypeT = typename Model::OutputType>
typedef LabelTypeT shark::AbstractTrainer< Model, LabelTypeT >::LabelType

Definition at line 69 of file AbstractTrainer.h.

◆ ModelType

template<class Model, class LabelTypeT = typename Model::OutputType>
typedef Model shark::AbstractTrainer< Model, LabelTypeT >::ModelType

Definition at line 67 of file AbstractTrainer.h.

Member Function Documentation

◆ train()


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