Re: [math] Inconsistent handling of insufficient data when computing correlations

2013-11-08 Thread Phil Steitz
On 11/8/13 1:27 PM, Phil Steitz wrote: > On 11/8/13 4:35 AM, Matt Adereth wrote: >> While writing the test cases for KendallsCorrelation, I discovered an >> interesting behavior with SpearmansCorrelation that might be considered an >> inconsistency. SpearmansCorrelation.correlate() throws >> MathI

Re: [math] Inconsistent handling of insufficient data when computing correlations

2013-11-08 Thread Phil Steitz
On 11/8/13 4:35 AM, Matt Adereth wrote: > While writing the test cases for KendallsCorrelation, I discovered an > interesting behavior with SpearmansCorrelation that might be considered an > inconsistency. SpearmansCorrelation.correlate() throws > MathIllegalArgumentException if the array length i

Re: [math] Inconsistent handling of insufficient data when computing correlations

2013-11-08 Thread Gilles
On Fri, 8 Nov 2013 07:35:01 -0500, Matt Adereth wrote: While writing the test cases for KendallsCorrelation, I discovered an interesting behavior with SpearmansCorrelation that might be considered an inconsistency. SpearmansCorrelation.correlate() throws MathIllegalArgumentException if the arr

[math] Inconsistent handling of insufficient data when computing correlations

2013-11-08 Thread Matt Adereth
While writing the test cases for KendallsCorrelation, I discovered an interesting behavior with SpearmansCorrelation that might be considered an inconsistency. SpearmansCorrelation.correlate() throws MathIllegalArgumentException if the array length is less than 2, but returns Double.NaN if the arr