Superclass of weighted supervised learning algorithms. More...
#include <shark/Algorithms/Trainers/AbstractWeightedTrainer.h>
 Inheritance diagram for shark::AbstractWeightedTrainer< Model, LabelTypeT >:
 Inheritance diagram for shark::AbstractWeightedTrainer< Model, LabelTypeT >:| Public Types | |
| typedef base_type::ModelType | ModelType | 
| typedef base_type::InputType | InputType | 
| typedef base_type::LabelType | LabelType | 
| typedef base_type::DatasetType | DatasetType | 
| typedef WeightedLabeledData< InputType, LabelType > | WeightedDatasetType | 
|  Public Types inherited from shark::AbstractTrainer< Model, LabelTypeT > | |
| typedef Model | ModelType | 
| typedef ModelType::InputType | InputType | 
| typedef LabelTypeT | LabelType | 
| typedef LabeledData< InputType, LabelType > | DatasetType | 
| Public Member Functions | |
| virtual void | train (ModelType &model, WeightedDatasetType const &dataset)=0 | 
| Executes the algorithm and trains a model on the given weighted data. | |
| virtual void | train (ModelType &model, DatasetType const &dataset) | 
| Executes the algorithm and trains a model on the given unweighted data. | |
|  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::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 () | |
Superclass of weighted supervised learning algorithms.
When all weights are integral values there is a simple interpretation of the weights as the multiplicity of a point. Thus training with a dataset with duplicate points is the same as counting the duplicates and run the algorithm with a weighted dataset where all points are unique and have their weight is the multiplicity.
Definition at line 61 of file AbstractWeightedTrainer.h.
| typedef base_type::DatasetType shark::AbstractWeightedTrainer< Model, LabelTypeT >::DatasetType | 
Definition at line 69 of file AbstractWeightedTrainer.h.
| typedef base_type::InputType shark::AbstractWeightedTrainer< Model, LabelTypeT >::InputType | 
Definition at line 67 of file AbstractWeightedTrainer.h.
| typedef base_type::LabelType shark::AbstractWeightedTrainer< Model, LabelTypeT >::LabelType | 
Definition at line 68 of file AbstractWeightedTrainer.h.
| typedef base_type::ModelType shark::AbstractWeightedTrainer< Model, LabelTypeT >::ModelType | 
Definition at line 66 of file AbstractWeightedTrainer.h.
| typedef WeightedLabeledData<InputType, LabelType> shark::AbstractWeightedTrainer< Model, LabelTypeT >::WeightedDatasetType | 
Definition at line 70 of file AbstractWeightedTrainer.h.
| 
 | inlinevirtual | 
Executes the algorithm and trains a model on the given unweighted data.
This method behaves as using train with a weighted dataset where all weights are equal. The default implementation just creates such a dataset and executes the weighted version of the algorithm.
Implements shark::AbstractTrainer< Model, LabelTypeT >.
Reimplemented in shark::LinearSAGTrainer< InputType, LabelType >.
Definition at line 80 of file AbstractWeightedTrainer.h.
References shark::AbstractWeightedTrainer< Model, LabelTypeT >::train().
| 
 | pure virtual | 
Executes the algorithm and trains a model on the given weighted data.
Implemented in shark::LinearSAGTrainer< InputType, LabelType >, and shark::LinearSAGTrainer< InputType, LabelType >.
Referenced by shark::AbstractWeightedTrainer< Model, LabelTypeT >::train().