#include <lwpr.hh>
Public Member Functions | |
LWPR_Object (int nIn, int nOut) | |
Creates an LWPR_Object for the given input and output dimensionalities. | |
LWPR_Object (const LWPR_Object &otherObj) | |
Creates a copy of an LWPR_Object. | |
LWPR_Object (const char *filename) | |
Creates an LWPR_Object from a binary file, or if compiled with support for EXPAT, an XML file. | |
~LWPR_Object () | |
Destroys an LWPR_Object and disposes allocated memory. | |
int | writeXML (const char *filename) |
Write the model to an XML file. | |
int | writeBinary (const char *filename) |
Write the model to a binary file. | |
doubleVec | update (const doubleVec &x, const doubleVec &y) |
Updates an LWPR model with a given input/output pair (x,y). | |
doubleVec | predict (const doubleVec &x, double cutoff=0.001) |
Computes the prediction of an LWPR model given an input vector x. | |
doubleVec | predict (const doubleVec &x, doubleVec &confidence, double cutoff=0.001) |
Computes the prediction of an LWPR model given an input vector x. Also computes confidence bounds per output dimension. | |
doubleVec | predict (const doubleVec &x, doubleVec &confidence, doubleVec &maxW, double cutoff=0.001) |
Computes the prediction of an LWPR model given an input vector x. Also computes confidence bounds and maximal activation per output dimension. | |
void | setInitD (double delta) |
Sets a spherical initial distance metric. | |
void | setInitD (const doubleVec &initD) |
Sets a diagonal or full initial distance metric. | |
void | setInitAlpha (double alpha) |
Sets init_alpha (learning rate for 2nd order distance metric updates). | |
void | wGen (double w_gen) |
Sets w_gen (threshold for adding new receptive fields). | |
void | wPrune (double w_prune) |
Sets w_prune (threshold for removing a receptive field). | |
void | penalty (double pen) |
Sets penalty (pre-factor for smoothing term in distance metric updates). | |
void | initLambda (double iLam) |
Sets initial forgetting factor. | |
void | tauLambda (double tLam) |
Sets annealing rate for forgetting factor. | |
void | finalLambda (double fLam) |
Sets final forgetting factor. | |
void | initS2 (double init_s2) |
Sets initial value for covariance computation SSs2. | |
void | updateD (bool update) |
Determines whether distance matrix updates are to be performed. | |
void | diagOnly (bool dOnly) |
Determines whether distance matrices should be treaded as diagonal-only. | |
void | useMeta (bool meta) |
Determines whether 2nd order distance matrix updates are to be performed. | |
void | metaRate (double rate) |
Sets the learning rate for 2nd order distance matrix updates. | |
void | kernel (LWPR_Kernel kern) |
Sets the kernel to be used in the LWPR model. | |
void | kernel (const char *str) |
Sets the kernel (either "Gaussian" or "BiSquare") to be used in the LWPR model. | |
int | nData () const |
Returns the number of training data the model has seen. | |
int | nIn () const |
Returns the input dimensionality. | |
int | nOut () const |
Returns the output dimensionality. | |
double | wGen () const |
Returns w_gen (threshold for adding new receptive fields). | |
double | wPrune () const |
Returns w_prune (threshold for removing a receptive field). | |
double | penalty () const |
Returns penalty (pre-factor for smoothing term in distance metric updates). | |
double | initLambda () const |
Returns initial forgetting factor. | |
double | tauLambda () const |
Returns annealing rate for forgetting factor. | |
double | finalLambda () const |
Returns final forgetting factor. | |
double | initS2 () const |
Returns initial value for the covariance computation SSs2. | |
bool | updateD () |
Returns whether distance matrix updates are performed. | |
bool | diagOnly () |
Returns whether distance matrices are treaded as diagonal-only. | |
bool | useMeta () |
Returns whether 2nd order distance matrix updates are performed. | |
double | metaRate () |
Returns learning rate for 2nd order distance matrix updates. | |
LWPR_Kernel | kernel () |
Returns the kernel. | |
doubleVec | meanX () |
Returns the mean of all input samples the model has seen. | |
doubleVec | varX () |
Returns the variance of all input samples the model has seen. | |
void | normIn (const doubleVec &norm) |
Sets the input normalisation (expected scale or standard deviation of input data. | |
doubleVec | normIn () const |
Returns the input normalisation factors. | |
void | normOut (const doubleVec &norm) |
Sets the output normalisation (expected scale or standard deviation of output data. | |
doubleVec | normOut () const |
Returns the output normalisation factors. | |
int | numRFS (int outDim) |
Returns the number of receptive fields for output dimension "outDim". | |
std::vector< int > | numRFS () |
Returns the number of receptive fields for all output dimensions. | |
LWPR_ReceptiveFieldObject | getRF (int outDim, int index) const |
Returns a wrapper object for inspecting a receptive field. | |
Data Fields | |
LWPR_Model | model |
Underlying C structure. |
|
Creates an LWPR_Object for the given input and output dimensionalities.
|
|
Creates a copy of an LWPR_Object.
|
|
Creates an LWPR_Object from a binary file, or if compiled with support for EXPAT, an XML file.
|
|
Returns a wrapper object for inspecting a receptive field.
|
|
Computes the prediction of an LWPR model given an input vector x. Also computes confidence bounds and maximal activation per output dimension.
|
|
Computes the prediction of an LWPR model given an input vector x. Also computes confidence bounds per output dimension.
|
|
Computes the prediction of an LWPR model given an input vector x.
|
|
Sets a diagonal or full initial distance metric.
|
|
Sets a spherical initial distance metric.
|
|
Updates an LWPR model with a given input/output pair (x,y).
|
|
Write the model to a binary file.
|
|
Write the model to an XML file.
|