Hi,
I analyse blood tests and not every blood sample is analysed for the
same values. It would be best if rows (tuples) that contain a NaN are
ignored.
Kind regards
Martin
Hello.
I am having difficulties using the Pearson Correlation because it
seems that it does not work if some cell is NaN. Is that intended?
Very likely. [When NaN appears in a computation, it propagates and the
result is NaN.]
Here is some code:
public static void main(String[] args) {
double [] row1 = new double[]{3,4};
double [] row2 = new double[]{1,8};
double [] row3 = new double[]{Double.NaN,4};
double[][] data = new double[][]{row1,row2,row3};
System.out.println(Arrays.deepToString(data));
PearsonsCorrelation coefMatrixP = new PearsonsCorrelation(data);
System.out.println(coefMatrixP.getCorrelationMatrix().toString());
}
What would you suggest should happen?
Regards,
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]