commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36331] - [math] spearman rank cross correlation
Date Wed, 24 Aug 2005 14:50:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36331>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36331





------- Additional Comments From brent@worden.org  2005-08-24 16:50 -------
Copied from the mailing list:
----- Original Message -----
From: "John Gant" <john.gant@gmail.com>
> 
> Specifically testTwo() in
> http://issues.apache.org/bugzilla/attachment.cgi?id=16172  takes care
> of data with equal value (ie equal rank), is this the type of
> situation to which you are referring? Yes I agree, we should implement
> routines to sort in more diverse ways, but for right now I depend upon
> Arrays.sort() to perform the sorting.

Yes, and in this case the implementation is incorrectly computing the spearman 
correlation as -0.1.  But, according to R, the correlation is drastically 
different:

> x <- c(2.0, 1.0, 3.0, 3.0, 5.0)
> y <- c(4.0, 4.0, 1.0, 2.0, 3.0)
> cor(x, y, method="spearman")
[1] -0.631579

Thus, I hold the implementation needs to change to correctly rank data with 
ties.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message