#include <lwpr.hpp>
Public Member Functions | |
LWPR () | |
Default constructor for LWPR algorithm. | |
LWPR (const boost::program_options::variables_map &vm) | |
This constructor takes a variables map and reads the necessary paramters for the class. | |
~LWPR () | |
Destructor. | |
void | learn (Types::Input x, Types::Output y) |
Update the LWPR model given a single data point. | |
Types::OutputT | predict (Types::Input x) const |
Make a prediction for some test point. | |
Private Types | |
typedef std::list< RF * > | RFList |
Type of list used to store receptive fields. | |
Private Attributes | |
LWPR::RFList | receptiveFields |
A List of pointers to Receptive Fields for this lwpr module. | |
const boost::program_options::variables_map & | vm |
reference to options map | |
Algorithm Paramters | |
This group of variables control the behavior of the algorithm.
All paramters are defined in the paper (see PAPER). | |
Types::RParam | w_gen |
w_gen controls the creation of new receptive fields. | |
Types::RParam | w_update |
w_update determines cut off for updating RFs. | |
Types::RParam | w_predict |
w_predict determines if an RF is used in prediction. | |
bool | diag |
diag determines whether a full or diagonal distance matrix is used. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const LWPR &lwpr) |
Print the model to a stream in simple format. |
The basic interface consists of funtions for learning and predicting as well as getting error estimates.
Definition at line 37 of file lwpr.hpp.
LWPR::LWPR | ( | const boost::program_options::variables_map & | vm | ) |
LWPR::~LWPR | ( | ) |
Destructor.
Needs to free up memory associtated with RFs.
Definition at line 45 of file lwpr.cpp.
References receptiveFields.
void LWPR::learn | ( | Types::Input | x, | |
Types::Output | y | |||
) |
Types::OutputT LWPR::predict | ( | Types::Input | x | ) | const |
Make a prediction for some test point.
The prediction is computed as in Equation 3.2
x | the input data to predict on |
Definition at line 102 of file lwpr.cpp.
References receptiveFields, and w_predict.
Types::RParam LWPR::w_gen [private] |
Types::RParam LWPR::w_update [private] |
Types::RParam LWPR::w_predict [private] |