iCub-main
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
iCub::learningmachine::SparseSpectrumFeature Class Reference

Implementation of Sparse Spectrum preprocessing. More...

#include <SparseSpectrumFeature.h>

+ Inheritance diagram for iCub::learningmachine::SparseSpectrumFeature:

Public Member Functions

 SparseSpectrumFeature (unsigned int dom=1, unsigned int cod=2, double sigma=1., yarp::sig::Vector ell=yarp::sig::Vector(0))
 Constructor. More...
 
virtual ~SparseSpectrumFeature ()
 Destructor (empty). More...
 
virtual SparseSpectrumFeatureclone ()
 Asks the transformer to return a new object of its type. More...
 
virtual yarp::sig::Vector transform (const yarp::sig::Vector &input)
 Transforms an input vector. More...
 
virtual std::string getInfo ()
 Asks the transformer to return a string containing statistics on its operation so far. More...
 
virtual std::string getConfigHelp ()
 Asks the transformer to return a string containing the list of configuration options that it supports. More...
 
virtual void setDomainSize (unsigned int size)
 Mutator for the domain size. More...
 
virtual void setCoDomainSize (unsigned int size)
 Mutator for the codomain size. More...
 
virtual void reset ()
 Forget everything and start over. More...
 
virtual bool configure (yarp::os::Searchable &config)
 
virtual double getSigma ()
 Accessor for the sigma parameter. More...
 
virtual void setSigma (double s)
 Mutator for the sigma parameter. More...
 
virtual yarp::sig::Vector & getEll ()
 Accessor for the characteristic length-scales parameter ell. More...
 
virtual void setEll (yarp::sig::Vector &ell)
 Mutator for the characteristic length-scales parameter ell. More...
 
- Public Member Functions inherited from iCub::learningmachine::IFixedSizeTransformer
 IFixedSizeTransformer (unsigned int dom=1, unsigned int cod=1)
 Constructor. More...
 
unsigned int getDomainSize () const
 Returns the size (dimensionality) of the input domain. More...
 
unsigned int getCoDomainSize () const
 Returns the size (dimensionality) of the output domain (codomain). More...
 
- Public Member Functions inherited from iCub::learningmachine::ITransformer
 ITransformer ()
 Constructor. More...
 
virtual ~ITransformer ()
 Destructor (empty). More...
 
std::string getName () const
 Retrieve the name of this transformer. More...
 
void setName (std::string name)
 Set the name of this transformer. More...
 
bool write (yarp::os::ConnectionWriter &connection) const
 
bool read (yarp::os::ConnectionReader &connection)
 
virtual std::string toString ()
 Asks the transformer to return a string serialization. More...
 
virtual bool fromString (const std::string &str)
 Asks the transformer to initialize from a string serialization. More...
 

Protected Member Functions

virtual void writeBottle (yarp::os::Bottle &bot)
 
virtual void readBottle (yarp::os::Bottle &bot)
 Unserializes a transformer from a bottle. More...
 
- Protected Member Functions inherited from iCub::learningmachine::IFixedSizeTransformer
virtual bool checkDomainSize (const yarp::sig::Vector &input)
 Checks whether the input is of the desired dimensionality. More...
 
virtual bool checkCoDomainSize (const yarp::sig::Vector &output)
 Checks whether the output is of the desired dimensionality. More...
 
void validateDomainSizes (const yarp::sig::Vector &input, const yarp::sig::Vector &output)
 Validates whether the input and output are of the desired dimensionality. More...
 
virtual void writeBottle (yarp::os::Bottle &bot) const
 Writes a serialization of the transformer into a bottle. More...
 

Protected Attributes

double sigma
 Noise parameter sigma. More...
 
yarp::sig::Vector ell
 Characteristic length-scales ell, analoguous to same parameter in asymmetric RBF kernel. More...
 
yarp::sig::Matrix W
 Projection matrix W. More...
 
- Protected Attributes inherited from iCub::learningmachine::IFixedSizeTransformer
unsigned int domainSize
 The dimensionality of the input domain. More...
 
unsigned int coDomainSize
 The dimensionality of the output domain (codomain). More...
 
- Protected Attributes inherited from iCub::learningmachine::ITransformer
std::string name
 The name of this type of transformer. More...
 
int sampleCount
 Number of samples transformed since initialization. More...
 

Detailed Description

Implementation of Sparse Spectrum preprocessing.

See also
iCub::learningmachine::RandomFeature

See: Sparse Spectrum Gaussian Process Regression. Miguel Lazaro-Gredilla, Joaquin Quinonero-Candela, Carl Edward Rasmussen, and Anibal R. Figueiras-Vidal. In Journal of Machine Learning Research (JMLR), 2010.

Author
Arjan Gijsberts

Definition at line 47 of file SparseSpectrumFeature.h.

Constructor & Destructor Documentation

◆ SparseSpectrumFeature()

iCub::learningmachine::SparseSpectrumFeature::SparseSpectrumFeature ( unsigned int  dom = 1,
unsigned int  cod = 2,
double  sigma = 1.,
yarp::sig::Vector  ell = yarp::sig::Vector(0) 
)

Constructor.

Parameters
dominitial domain size
codinitial codomain size
sigmainitial value for sigma
ellinitial value for \ell

Definition at line 41 of file SparseSpectrumFeature.cpp.

◆ ~SparseSpectrumFeature()

virtual iCub::learningmachine::SparseSpectrumFeature::~SparseSpectrumFeature ( )
inlinevirtual

Destructor (empty).

Definition at line 90 of file SparseSpectrumFeature.h.

Member Function Documentation

◆ clone()

virtual SparseSpectrumFeature* iCub::learningmachine::SparseSpectrumFeature::clone ( )
inlinevirtual

Asks the transformer to return a new object of its type.

Returns
a fresh instance of the current class

Implements iCub::learningmachine::ITransformer.

Definition at line 95 of file SparseSpectrumFeature.h.

◆ configure()

bool iCub::learningmachine::SparseSpectrumFeature::configure ( yarp::os::Searchable &  config)
virtual

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 143 of file SparseSpectrumFeature.cpp.

◆ getConfigHelp()

std::string iCub::learningmachine::SparseSpectrumFeature::getConfigHelp ( )
virtual

Asks the transformer to return a string containing the list of configuration options that it supports.

Returns
an informative description of the configuration options

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 135 of file SparseSpectrumFeature.cpp.

◆ getEll()

virtual yarp::sig::Vector& iCub::learningmachine::SparseSpectrumFeature::getEll ( )
inlinevirtual

Accessor for the characteristic length-scales parameter ell.

Returns
ell.

Definition at line 157 of file SparseSpectrumFeature.h.

◆ getInfo()

std::string iCub::learningmachine::SparseSpectrumFeature::getInfo ( )
virtual

Asks the transformer to return a string containing statistics on its operation so far.

Returns
the statistics of the transformer

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 127 of file SparseSpectrumFeature.cpp.

◆ getSigma()

virtual double iCub::learningmachine::SparseSpectrumFeature::getSigma ( )
inlinevirtual

Accessor for the sigma parameter.

Returns
sigma.

Definition at line 139 of file SparseSpectrumFeature.h.

◆ readBottle()

void iCub::learningmachine::SparseSpectrumFeature::readBottle ( yarp::os::Bottle &  bot)
protectedvirtual

Unserializes a transformer from a bottle.

This method is internally referenced by the read method. Typically, subclasses should override this method instead of overriding the read method directly.

Parameters
botthe bottle

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 107 of file SparseSpectrumFeature.cpp.

◆ reset()

void iCub::learningmachine::SparseSpectrumFeature::reset ( )
virtual

Forget everything and start over.

Reimplemented from iCub::learningmachine::ITransformer.

Definition at line 83 of file SparseSpectrumFeature.cpp.

◆ setCoDomainSize()

void iCub::learningmachine::SparseSpectrumFeature::setCoDomainSize ( unsigned int  size)
virtual

Mutator for the codomain size.

Parameters
sizethe desired codomain size

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 72 of file SparseSpectrumFeature.cpp.

◆ setDomainSize()

void iCub::learningmachine::SparseSpectrumFeature::setDomainSize ( unsigned int  size)
virtual

Mutator for the domain size.

Parameters
sizethe desired domain size

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 65 of file SparseSpectrumFeature.cpp.

◆ setEll()

void iCub::learningmachine::SparseSpectrumFeature::setEll ( yarp::sig::Vector &  ell)
virtual

Mutator for the characteristic length-scales parameter ell.

Parameters
ellthe desired ell.

Definition at line 116 of file SparseSpectrumFeature.cpp.

◆ setSigma()

virtual void iCub::learningmachine::SparseSpectrumFeature::setSigma ( double  s)
inlinevirtual

Mutator for the sigma parameter.

Parameters
sthe desired sigma.

Definition at line 148 of file SparseSpectrumFeature.h.

◆ transform()

yarp::sig::Vector iCub::learningmachine::SparseSpectrumFeature::transform ( const yarp::sig::Vector &  input)
virtual

Transforms an input vector.

Parameters
inputthe input vector
Returns
the output vector

Reimplemented from iCub::learningmachine::IFixedSizeTransformer.

Definition at line 52 of file SparseSpectrumFeature.cpp.

◆ writeBottle()

void iCub::learningmachine::SparseSpectrumFeature::writeBottle ( yarp::os::Bottle &  bot)
protectedvirtual

Definition at line 100 of file SparseSpectrumFeature.cpp.

Member Data Documentation

◆ ell

yarp::sig::Vector iCub::learningmachine::SparseSpectrumFeature::ell
protected

Characteristic length-scales ell, analoguous to same parameter in asymmetric RBF kernel.

Definition at line 58 of file SparseSpectrumFeature.h.

◆ sigma

double iCub::learningmachine::SparseSpectrumFeature::sigma
protected

Noise parameter sigma.

Definition at line 52 of file SparseSpectrumFeature.h.

◆ W

yarp::sig::Matrix iCub::learningmachine::SparseSpectrumFeature::W
protected

Projection matrix W.

Definition at line 63 of file SparseSpectrumFeature.h.


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