Adaptive window polynomial fitting.
More...
#include <adaptWinPolyEstimator.h>
|
| AWPolyEstimator (unsigned int _order, unsigned int _N, const double _D) |
| Create a polynomial estimator object of order _order on an adaptive window of a maximum length _N an threshold _D. More...
|
|
AWPolyList & | getList () |
| Return a reference to internal elements list. More...
|
|
void | feedData (const AWPolyElement &el) |
| Feed data into the algorithm. More...
|
|
yarp::sig::Vector | getWinLen () |
| Return the current windows lengths. More...
|
|
yarp::sig::Vector | getMSE () |
| Return the mean squared error (MSE) computed over the current windows lengths between the predictions and the real data. More...
|
|
yarp::sig::Vector | estimate () |
| Execute the algorithm upon the elements list, with the max deviation threshold given by D. More...
|
|
yarp::sig::Vector | estimate (const AWPolyElement &el) |
| Execute the algorithm upon the elements list, with the max deviation threshold given by D. More...
|
|
void | reset () |
| Reinitialize the internal state. More...
|
|
virtual | ~AWPolyEstimator () |
| Destructor. More...
|
|
|
virtual yarp::sig::Vector | fit (const yarp::sig::Vector &x, const yarp::sig::Vector &y, const unsigned int n=0) |
| Find the regressor which best fits in least square sense the last n data sample couples, or all couples if n==0. More...
|
|
virtual double | eval (double x) |
| Evaluate regressor at certain point. More...
|
|
virtual double | getEsteeme ()=0 |
| Return the current estimation. More...
|
|
Adaptive window polynomial fitting.
Abstract class.
Definition at line 73 of file adaptWinPolyEstimator.h.
◆ AWPolyEstimator()
AWPolyEstimator::AWPolyEstimator |
( |
unsigned int |
_order, |
|
|
unsigned int |
_N, |
|
|
const double |
_D |
|
) |
| |
Create a polynomial estimator object of order _order on an adaptive window of a maximum length _N an threshold _D.
- Parameters
-
_order | is the order of polynomial fitting. |
_N | is the maximum windows length. |
_D | is the threshold. |
Definition at line 27 of file adaptWinPolyEstimator.cpp.
◆ ~AWPolyEstimator()
virtual iCub::ctrl::AWPolyEstimator::~AWPolyEstimator |
( |
| ) |
|
|
inlinevirtual |
◆ estimate() [1/2]
Vector AWPolyEstimator::estimate |
( |
| ) |
|
Execute the algorithm upon the elements list, with the max deviation threshold given by D.
- Returns
- the current estimation.
Definition at line 100 of file adaptWinPolyEstimator.cpp.
◆ estimate() [2/2]
Execute the algorithm upon the elements list, with the max deviation threshold given by D.
- Parameters
-
- Returns
- the current estimation.
Definition at line 185 of file adaptWinPolyEstimator.cpp.
◆ eval()
double AWPolyEstimator::eval |
( |
double |
x | ) |
|
|
protectedvirtual |
Evaluate regressor at certain point.
- Parameters
-
- Returns
- regressor evaluated in x.
Definition at line 41 of file adaptWinPolyEstimator.cpp.
◆ feedData()
◆ fit()
Vector AWPolyEstimator::fit |
( |
const yarp::sig::Vector & |
x, |
|
|
const yarp::sig::Vector & |
y, |
|
|
const unsigned int |
n = 0 |
|
) |
| |
|
protectedvirtual |
Find the regressor which best fits in least square sense the last n data sample couples, or all couples if n==0.
- Parameters
-
x | vector containing the input data. |
y | vector containing the output data. |
n | last n data sample couples to fit. |
- Returns
- the regressor's coefficients.
Reimplemented in iCub::ctrl::AWLinEstimator.
Definition at line 55 of file adaptWinPolyEstimator.cpp.
◆ getEsteeme()
virtual double iCub::ctrl::AWPolyEstimator::getEsteeme |
( |
| ) |
|
|
protectedpure virtual |
◆ getList()
AWPolyList& iCub::ctrl::AWPolyEstimator::getList |
( |
| ) |
|
|
inline |
Return a reference to internal elements list.
- Returns
- reference to internal elements list.
Definition at line 128 of file adaptWinPolyEstimator.h.
◆ getMSE()
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::getMSE |
( |
| ) |
|
|
inline |
Return the mean squared error (MSE) computed over the current windows lengths between the predictions and the real data.
- Returns
- the MSE.
Definition at line 147 of file adaptWinPolyEstimator.h.
◆ getWinLen()
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::getWinLen |
( |
| ) |
|
|
inline |
◆ reset()
void AWPolyEstimator::reset |
( |
| ) |
|
Reinitialize the internal state.
- Note
- Windows lengths are brought to the maximum value N and output remains zero as long as fed data size reaches N.
Definition at line 193 of file adaptWinPolyEstimator.cpp.
◆ coeff
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::coeff |
|
protected |
double iCub::ctrl::AWPolyEstimator::D |
|
protected |
◆ elemList
◆ firstRun
bool iCub::ctrl::AWPolyEstimator::firstRun |
|
protected |
◆ mse
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::mse |
|
protected |
unsigned int iCub::ctrl::AWPolyEstimator::N |
|
protected |
◆ order
unsigned int iCub::ctrl::AWPolyEstimator::order |
|
protected |
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::t |
|
protected |
◆ winLen
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::winLen |
|
protected |
yarp::sig::Vector iCub::ctrl::AWPolyEstimator::x |
|
protected |
The documentation for this class was generated from the following files: