Hi David,
Appreciate the feedback.
The issue I have is actually finding out how to determine the rank.
I have found 2 methods - one that uses a matrix norm [2] (apache math commons project)
and another that simply checks for non zero diagonal elements in the R matrix
(no.uib.cipr.matrix.QRP, see [1]). The latter uses LAPACK (see
"com.github.fommil.netlib.LAPACK" in [3])
My understanding is that Breeze is using netlib-java. Can you tell me if you are
using DGEQP3? If so I may be able to use the code snippet below taken from [1].
Does this make sense? If this is doable maybe it can also be included into the Beeze code.
Please note that I am not knowledgeable about matrix or any other numeric computation methods, hence the questions.
TIA,
HF
1.
https://github.com/fommil/matrix-toolkits-java/blob/master/src/main/java/no/uib/cipr/matrix/QRP.java2.
https://en.wikipedia.org/wiki/Matrix_norm#Frobenius_norm3.
https://github.com/fommil/netlib-java /*
* Calculate the rank based on a precision EPS
*/
final double EPS = 1e-12;
for (rank = 0; rank < k; rank++) {
if (Math.abs(R.get(rank, rank)) < EPS)
break;
}