|
From: Klaus S. <kl...@sp...> - 2010-10-28 13:10:16
|
Hi
On Wednesday 08 September 2010 15:42:04 Kakhkhor Abdijalilov wrote:
> SVD can deal with collinearity, but the cutoff threshold for small
> singular values in LinearLeastSquaresRegression is n*QL_EPSILON (n is
> matrix size).
>
> Btw, the cutoff should be applied to the ratio of singular values, not
> to the singular values directly. That is something we need to fix as
> well.
correct. What do you think about the following bug-fix for OLS purposes
change line 116 of linearleastsquaresregression.hpp towards
const Real threshold
= n*QL_EPSILON*(*std::max_element(w.begin(), w.end()));
best regards
Klaus
|