Train a linear model to normalize the components of a dataset to unit variance, and optionally to zero mean. More...
#include <shark/Algorithms/Trainers/NormalizeComponentsUnitVariance.h>
Inheritance diagram for shark::NormalizeComponentsUnitVariance< DataType >:Public Member Functions | |
| NormalizeComponentsUnitVariance (bool zeroMean) | |
| Constructor. | |
| std::string | name () const |
| From INameable: return the class name. | |
| void | train (Normalizer< DataType > &model, UnlabeledData< DataType > 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 | |
| bool | m_zeroMean |
Additional Inherited Members | |
Public Types inherited from shark::AbstractUnsupervisedTrainer< Model > | |
| typedef Model | ModelType |
| typedef Model::InputType | InputType |
| typedef UnlabeledData< InputType > | DatasetType |
Train a linear model to normalize the components of a dataset to unit variance, and optionally to zero mean.
Definition at line 74 of file NormalizeComponentsUnitVariance.h.
|
inline |
Constructor.
| zeroMean | enable or disable data mean removal |
Definition at line 89 of file NormalizeComponentsUnitVariance.h.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 93 of file NormalizeComponentsUnitVariance.h.
|
inline |
Definition at line 96 of file NormalizeComponentsUnitVariance.h.
References shark::dataDimension(), shark::NormalizeComponentsUnitVariance< DataType >::m_zeroMean, shark::mean(), shark::meanvar(), shark::Data< Type >::numberOfElements(), shark::Normalizer< VectorType >::setStructure(), SHARK_RUNTIME_CHECK, and shark::variance().
Referenced by main(), main(), and run_one_trial().
|
protected |
Definition at line 129 of file NormalizeComponentsUnitVariance.h.
Referenced by shark::NormalizeComponentsUnitVariance< DataType >::train().