iCub-main
|
Implementation of Sparse Spectrum preprocessing. More...
#include <SparseSpectrumFeature.h>
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 SparseSpectrumFeature * | clone () |
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... | |
Implementation of Sparse Spectrum preprocessing.
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.
Definition at line 47 of file SparseSpectrumFeature.h.
iCub::learningmachine::SparseSpectrumFeature::SparseSpectrumFeature | ( | unsigned int | dom = 1 , |
unsigned int | cod = 2 , |
||
double | sigma = 1. , |
||
yarp::sig::Vector | ell = yarp::sig::Vector(0) |
||
) |
Constructor.
dom | initial domain size |
cod | initial codomain size |
sigma | initial value for sigma |
ell | initial value for \ell |
Definition at line 41 of file SparseSpectrumFeature.cpp.
|
inlinevirtual |
Destructor (empty).
Definition at line 90 of file SparseSpectrumFeature.h.
|
inlinevirtual |
Asks the transformer to return a new object of its type.
Implements iCub::learningmachine::ITransformer.
Definition at line 95 of file SparseSpectrumFeature.h.
|
virtual |
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 143 of file SparseSpectrumFeature.cpp.
|
virtual |
Asks the transformer to return a string containing the list of configuration options that it supports.
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 135 of file SparseSpectrumFeature.cpp.
|
inlinevirtual |
Accessor for the characteristic length-scales parameter ell.
Definition at line 157 of file SparseSpectrumFeature.h.
|
virtual |
Asks the transformer to return a string containing statistics on its operation so far.
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 127 of file SparseSpectrumFeature.cpp.
|
inlinevirtual |
Accessor for the sigma parameter.
Definition at line 139 of file SparseSpectrumFeature.h.
|
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.
bot | the bottle |
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 107 of file SparseSpectrumFeature.cpp.
|
virtual |
Forget everything and start over.
Reimplemented from iCub::learningmachine::ITransformer.
Definition at line 83 of file SparseSpectrumFeature.cpp.
|
virtual |
Mutator for the codomain size.
size | the desired codomain size |
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 72 of file SparseSpectrumFeature.cpp.
|
virtual |
Mutator for the domain size.
size | the desired domain size |
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 65 of file SparseSpectrumFeature.cpp.
|
virtual |
Mutator for the characteristic length-scales parameter ell.
ell | the desired ell. |
Definition at line 116 of file SparseSpectrumFeature.cpp.
|
inlinevirtual |
Mutator for the sigma parameter.
s | the desired sigma. |
Definition at line 148 of file SparseSpectrumFeature.h.
|
virtual |
Transforms an input vector.
input | the input vector |
Reimplemented from iCub::learningmachine::IFixedSizeTransformer.
Definition at line 52 of file SparseSpectrumFeature.cpp.
|
protectedvirtual |
Definition at line 100 of file SparseSpectrumFeature.cpp.
|
protected |
Characteristic length-scales ell, analoguous to same parameter in asymmetric RBF kernel.
Definition at line 58 of file SparseSpectrumFeature.h.
|
protected |
Noise parameter sigma.
Definition at line 52 of file SparseSpectrumFeature.h.
|
protected |
Projection matrix W.
Definition at line 63 of file SparseSpectrumFeature.h.