Class for linear function approximation with the univariate Radial basis. More...
#include <radial_approx.h>
Public Member Functions | |
virtual double | evalAt (double x) |
Evaluate the function approximator at point x. | |
virtual void | leastSquaresWeights (double *X, double *Y, int n_pts) |
Computes the least squares weights given a set of data points. | |
RadialApprox (int num_bases, double base_width, double alpha) | |
RadialApprox (const std::vector< double > &w, double base_width, double alpha) | |
virtual | ~RadialApprox () |
Private Member Functions | |
void | calcFeatures (double x) |
Calculate the Radial basis features at point x. | |
Eigen::MatrixXd | pseudoinverse (Eigen::MatrixXd mat) |
Calculate the Moore-Penrose pseudoinverse of a matrix using SVD. | |
Private Attributes | |
double * | centers |
double * | features |
double * | widths |
Class for linear function approximation with the univariate Radial basis.
Definition at line 53 of file radial_approx.h.
dmp::RadialApprox::RadialApprox | ( | int | num_bases, |
double | base_width, | ||
double | alpha | ||
) |
Definition at line 49 of file radial_approx.cpp.
dmp::RadialApprox::RadialApprox | ( | const std::vector< double > & | w, |
double | base_width, | ||
double | alpha | ||
) |
dmp::RadialApprox::~RadialApprox | ( | ) | [virtual] |
Definition at line 79 of file radial_approx.cpp.
void dmp::RadialApprox::calcFeatures | ( | double | x | ) | [private] |
Calculate the Radial basis features at point x.
x | The point at which to get features |
Definition at line 121 of file radial_approx.cpp.
double dmp::RadialApprox::evalAt | ( | double | x | ) | [virtual] |
Evaluate the function approximator at point x.
x | The point at which to evaluate |
Implements dmp::FunctionApprox.
Definition at line 87 of file radial_approx.cpp.
void dmp::RadialApprox::leastSquaresWeights | ( | double * | X, |
double * | Y, | ||
int | n_pts | ||
) | [virtual] |
Computes the least squares weights given a set of data points.
X | A vector of the domain values of the points |
Y | A vector of the target values of the points |
Implements dmp::FunctionApprox.
Definition at line 99 of file radial_approx.cpp.
MatrixXd dmp::RadialApprox::pseudoinverse | ( | Eigen::MatrixXd | mat | ) | [private] |
Calculate the Moore-Penrose pseudoinverse of a matrix using SVD.
mat | The matrix to pseudoinvert |
Definition at line 134 of file radial_approx.cpp.
double* dmp::RadialApprox::centers [private] |
Definition at line 84 of file radial_approx.h.
double* dmp::RadialApprox::features [private] |
Definition at line 83 of file radial_approx.h.
double* dmp::RadialApprox::widths [private] |
Definition at line 85 of file radial_approx.h.