#include <rf.hpp>
Inheritance diagram for RF:
Public Member Functions | |
RF () | |
Default constructor for the RF. | |
RF (Types::Input c) | |
A constructor taking only a center point for the RF. | |
RF (Types::Input c, const boost::program_options::variables_map &vm) | |
A constructor taking a center point and a variables_map. | |
virtual Types::RValue | getActivation (Types::Input x) const =0 |
Return the activation for a test point. | |
Types::OutputT | predict (Types::Input x) const |
Return the predicted value for an unput x. | |
Types::OutputT | confidence (Types::Input x) const |
return the predictive variance for a point | |
bool | trustworthy () const |
Check whether the RF is trustworthy. | |
virtual Types::RValue | learn (Types::Input x, Types::Output y, Types::RValueP w)=0 |
Update the receptive field and have local model update itself. | |
Protected Attributes | |
Types::vector | z |
store the projection of x | |
Types::vector | temp2 |
Types::vector | q |
Types::vector | H_temp |
Algorithm Parameters | |
This group of variables control the behavior of the algorithm.
All paramters are defined in the paper (see PAPER). | |
Types::RParam | d_def |
d_def is the initial value for diagonal of distance matrix in RF. | |
Types::RParam | lambda |
A forgetting factor for sufficient statistics. | |
Types::RParam | gamma |
A weight on the distance matrix penalty. | |
Types::RParam | alpha_init |
alpha_init is the initial learning rate for all distance elements | |
bool | meta |
determine if meta updates are done | |
Types::RValue | meta_alpha |
meta_learning rate | |
RF Descriptors | |
These variables describe the receptive field.
They include the center, distance matrix, and local regression model | |
Types::vector | center |
The center point of the RF. | |
Model | localModel |
the receptive fields local model | |
Sufficient Statistics | |
Types::RValue | W |
Activation history. | |
Types::vector | a_H |
Types::vector | a_G |
Types::RValue | a_E |
Types::RValue | a_pk |
confidence intervals ss | |
Types::RValue | sigma |
Types::RValue | e_2 |
Friends | |
std::ostream & | operator<< (std::ostream &out, const RF &rf) |
Print the receptive field to a stream in simple format. |
This class handles updates of the distance matrix for the receptive field and hold the local model associated with the field.
Definition at line 38 of file rf.hpp.
RF::RF | ( | Types::Input | c | ) |
virtual Types::RValue RF::getActivation | ( | Types::Input | x | ) | const [pure virtual] |
Return the activation for a test point.
This currently uses ublas vectro expressions, but should be changed to use blas calls once everything is working correctly.
x | the input vector |
Implemented in RFDiag, and RFFull.
Referenced by confidence().
Types::OutputT RF::predict | ( | Types::Input | x | ) | const [inline] |
Return the predicted value for an unput x.
x | the input vector |
Definition at line 162 of file rf.hpp.
References localModel, and Model::predict().
Here is the call graph for this function:
Types::OutputT RF::confidence | ( | Types::Input | x | ) | const |
return the predictive variance for a point
x | the input point |
Definition at line 88 of file rf.cpp.
References a_pk, Model::check_derivatives(), Model::get_a_zz(), getActivation(), localModel, Model::project(), q, and z.
Here is the call graph for this function:
bool RF::trustworthy | ( | ) | const [inline] |
Check whether the RF is trustworthy.
Definition at line 177 of file rf.hpp.
References localModel, and Model::trustworthy().
Here is the call graph for this function:
virtual Types::RValue RF::learn | ( | Types::Input | x, | |
Types::Output | y, | |||
Types::RValueP | w | |||
) | [pure virtual] |
Types::RParam RF::lambda [protected] |
A forgetting factor for sufficient statistics.
This parameter must have a value in [0,1]. It may be updated over time.
Definition at line 59 of file rf.hpp.
Referenced by RFFull::learn(), RFDiag::learn(), and RF().