LWPR Class Reference

Implements the high level interface to the LWPR algorithm. More...

#include <lwpr.hpp>

List of all members.

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.


Detailed Description

Implements the high level interface to the LWPR algorithm.

The basic interface consists of funtions for learning and predicting as well as getting error estimates.

Definition at line 37 of file lwpr.hpp.


Constructor & Destructor Documentation

LWPR::LWPR ( const boost::program_options::variables_map &  vm  ) 

This constructor takes a variables map and reads the necessary paramters for the class.

I'll probably make this dependent on a compiler flag since it requires an external shared library.

Definition at line 38 of file lwpr.cpp.

References diag, vm, w_gen, w_predict, and w_update.

LWPR::~LWPR (  ) 

Destructor.

Needs to free up memory associtated with RFs.

Definition at line 45 of file lwpr.cpp.

References receptiveFields.


Member Function Documentation

void LWPR::learn ( Types::Input  x,
Types::Output  y 
)

Update the LWPR model given a single data point.

Parameters:
x the input data
y the value to regress on

Definition at line 52 of file lwpr.cpp.

References diag, receptiveFields, vm, w_gen, and w_update.

Types::OutputT LWPR::predict ( Types::Input  x  )  const

Make a prediction for some test point.

The prediction is computed as in Equation 3.2 $ \hat y = \frac{\sum w_k \hat y_k}{\sum w_k} $

Parameters:
x the input data to predict on

Definition at line 102 of file lwpr.cpp.

References receptiveFields, and w_predict.


Member Data Documentation

Types::RParam LWPR::w_gen [private]

w_gen controls the creation of new receptive fields.

If the activation of all RFs at a point is less than w_gen a new RF is created.

Definition at line 52 of file lwpr.hpp.

Referenced by learn(), and LWPR().

Types::RParam LWPR::w_update [private]

w_update determines cut off for updating RFs.

If an RFs activation is greater than w_update it gets updated.

Definition at line 58 of file lwpr.hpp.

Referenced by learn(), and LWPR().

Types::RParam LWPR::w_predict [private]

w_predict determines if an RF is used in prediction.

Use an RF in the prediction if its activation is greater than w_predict.

Definition at line 64 of file lwpr.hpp.

Referenced by LWPR(), and predict().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 00:24:01 2007 for LWPR by  doxygen 1.5.1