Posted by
Klaus Spanderen-2 on
URL: http://quantlib.414.s1.nabble.com/Longstaff-Schwartz-method-SVD-and-OLS-tp8855p8856.html
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
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev