Train a linear model to whiten the data. More...
#include <shark/Algorithms/Trainers/NormalizeComponentsZCA.h>
Public Member Functions | |
NormalizeComponentsZCA (double targetVariance=1.0) | |
std::string | name () const |
From INameable: return the class name. | |
void | train (ModelType &model, UnlabeledData< RealVector > const &input) |
Public Member Functions inherited from shark::AbstractUnsupervisedTrainer< LinearModel< RealVector > > | |
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 () | |
Public Attributes | |
double | m_targetVariance |
Additional Inherited Members | |
Public Types inherited from shark::AbstractUnsupervisedTrainer< LinearModel< RealVector > > | |
typedef LinearModel< RealVector > | ModelType |
typedef Model::InputType | InputType |
typedef UnlabeledData< InputType > | DatasetType |
Train a linear model to whiten the data.
ZCA does whitening in the sense that it sets the mean to zero and the covariance to the Identity. However in contrast to NormalizeComponentsWhitening it makes sure that the initial and end coordinate system are the same and just rescales the data. The effect is, that image data still resembles images after applying ZCA in contrast to other methods which rotate the data randomly.
Definition at line 55 of file NormalizeComponentsZCA.h.
|
inline |
Definition at line 61 of file NormalizeComponentsZCA.h.
References m_targetVariance, and SHARK_RUNTIME_CHECK.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 67 of file NormalizeComponentsZCA.h.
|
inline |
Definition at line 70 of file NormalizeComponentsZCA.h.
References shark::covariance(), shark::dataDimension(), m_targetVariance, shark::mean(), shark::meanvar(), shark::Data< Type >::numberOfElements(), shark::LinearModel< InputType, ActivationFunction >::setStructure(), and SHARK_RUNTIME_CHECK.
double shark::NormalizeComponentsZCA::m_targetVariance |
Definition at line 60 of file NormalizeComponentsZCA.h.
Referenced by NormalizeComponentsZCA(), and train().