Re: [Math] Re: LU decomposition very SLOW (commons.math3.linear)

2016-10-27 Thread wilbur
Hello Gilles,

thanks for your interest! I am attaching a minimal example that demonstrates
this behavior.
The matrix -- which I create with MatrixUtils.createRealMatrix() -- is dense
(of type BlockRealMatrix).

The results listed at the bottom of the main class suggest, that execution
times for the standard LUDecomposition get out of proportion for N 
somewhere between 750 and 1000.

I am also including the ‘MyLUDecomposition’ implementation provided by Smile
as a separate class. It is fast but I can’t say if it is numerically as good
as the Commons Math version.

Hope this is conclusive. I am new to this group, not sure if the attachment
gets delivered. 
Appreciate any hints.

--Wilhelm
lu_decomp_test.zip
  



--
View this message in context: 
http://apache-commons.680414.n4.nabble.com/math-LU-decomposition-very-SLOW-commons-math3-linear-tp4692255p4692259.html
Sent from the Commons - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org



LU decomposition very SLOW (commons.math3.linear)

2016-10-27 Thread wilbur
Hello all,

I am using LUDecomposition in a kriging application, where I noticed that
the Commons Math implementation slows down dramatically with growing matrix
size. E.g., on (symmetric) matrices of size ~1600 x 1600, LUDecomposition
takes about 10 times (!) longer than QRDecomposition or the Java
implementation of Crout's algorithm [1] in Smile [2]. 

Average figures are (Java 1.8.0_65, Win7, Intel i7-4790K, 4.00 GHz, 16 GB):
   Commons Math LUDecomposition: ~10,500 ms (!)
   Commons Math QRDecomposition:  ~1,350 ms
   Smile LUDecomposition: ~1,300 ms

Seems odd. Is this a known problem and can this behaviour be explained?

--Wilhelm

___
[1] Numerical Recipes, 3rd ed. (Sec. 2.3.1)
[2] https://github.com/haifengl/smile



--
View this message in context: 
http://apache-commons.680414.n4.nabble.com/LU-decomposition-very-SLOW-commons-math3-linear-tp4692255.html
Sent from the Commons - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org