Replace Laguerre solver with eigenvalue solver
Opened this issue · 2 comments
Laguerre solver does a poor job in practice. I used it for a closed-source Arima implementation and felt compelled to replace it with this PolynomialRootFinder class that uses a companion matrix and its eigenvalues: http://stackoverflow.com/questions/13805644/finding-roots-of-polynomial-in-java
The only downside is the need to add EJML as a dependency, although I suppose apache commons linear algebra library (slower than EJML, but we're dealing with very small matrices here) could be swapped in for it.
Hi @jrachiele, if you're interested in making this change, I'd be happy to review it!
Pull request made. Adapted for commons-math3 so no need to bring in EJML. Only downside to that is that EJML is known to be faster, but since we're dealing with such small matrices it probably won't matter.