3 namespace ublas = boost::numeric::ublas;
5 #include <boost/numeric/ublas/operation.hpp>
15 LSSOFilter(inputsize), delta(0.9999999), lambda(1), P(inputsize,
16 inputsize), pi(inputsize), k(inputsize)
18 P = 1. / delta * ublas::identity_matrix<double>(inputsize);
22 const double MyLambda) :
23 LSSOFilter(inputsize), delta(MyDelta), lambda(MyLambda), P(inputsize,
24 inputsize), pi(inputsize), k(inputsize)
26 P = 1. / delta * ublas::identity_matrix<double>(inputsize);
34 const gplib::rvec &Desired)
37 ublas::axpy_prod(P,Input,pi,
true);
39 k = pi / (lambda + ublas::prec_inner_prod(Input, pi));
42 ublas::noalias(temp1) -= ublas::prec_prod(ublas::outer_prod(k,Input),P);
const gplib::rvec & GetEpsilon() const
Return the last estimation error.
void SetEpsilon(const gplib::rvec &MyEps)
Possibility for derived classes to set estimation error.
virtual void AdaptFilter(const gplib::rvec &Input, const gplib::rvec &Desired)
Adapt the filter weights given the Input and Desired vectors.
const gplib::rvec & GetFilterOutput() const
Access to the last calculated output (not sure if needed)
gplib::rvec & SetWeights()
RLSCanceller(const int inputsize)
Base class for least squares filter with a single output value.