Should PearsonsCorrelation#computeCorrelationMatrix() check NaN results here to detect errors earlier in the computation?
|
double corr = correlation(matrix.getColumn(i), matrix.getColumn(j)); |
if (Double.isNaN(corr)){
throw exception
}
Example matrix {{0.0,0.0},{0.0,0.0}}
Should
PearsonsCorrelation#computeCorrelationMatrix()check NaN results here to detect errors earlier in the computation?hipparchus/hipparchus-stat/src/main/java/org/hipparchus/stat/correlation/PearsonsCorrelation.java
Line 235 in 43dcbbd
Example matrix
{{0.0,0.0},{0.0,0.0}}