[ 
https://issues.apache.org/jira/browse/SPARK-12815?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Dodier updated SPARK-12815:
----------------------------------
    Description: 
The Wilcoxon-Mann-Whitney rank sum statistic (also known by other permutations 
of those names) is a useful assessment of relevance of an input field for a 
classification problem. As such it would nice to have in ML or MLlib (I don't 
know what's a more suitable package for it).

I have created a Spark package, 
[spark-wilcoxon|http://spark-packages.org/package/robert-dodier/spark-wilcoxon],
 to demonstrate an implementation. If there is interest in this issue, I'll 
create a pull request. spark-wilcoxon computes the scaled rank sum statistic 
{{U/(n0*n1)}}, where {{U}} is the rank sum statistic and {{n0}} and {{n1}} are 
the numbers of data in class 0 and class 1, respectively.

There exists already the Spearman rank correlation statistic in MLlib (in 
...mllib.stat.correlation.SpearmanCorrelation) but that is not equivalent to 
the WMW statistic -- the one cannot be derived from the other because the 
Spearman correlation contains squares of rank differences and the WMW contains 
only first-order terms.

See the Wikipedia article [Mann-Whitney U 
test|https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test] for formulas 
and background information. At this point, I am proposing only to compute the 
rank sum statistic, not to implement the significance test.

  was:
The Wilcoxon-Mann-Whitney rank sum statistic (also known by other permutations 
of those names) is a useful assessment of relevance of an input field for a 
classification problem. As such it would nice to have in ML or MLlib (I don't 
know what's a more suitable package for it).

I have created a Spark package, 
[spark-wilcoxon|http://spark-packages.org/package/robert-dodier/spark-wilcoxon],
 to demonstrate an implementation. If there is interest in this issue, I'll 
create a pull request. spark-wilcoxon computes the scaled rank sum statistic 
`U/(n0*n1)`, where `U` is the rank sum statistic and `n0` and `n1` are the 
numbers of data in class 0 and class 1, respectively.

There exists already the Spearman rank correlation statistic in MLlib (in 
...mllib.stat.correlation.SpearmanCorrelation) but that is not equivalent to 
the WMW statistic -- the one cannot be derived from the other because the 
Spearman correlation contains squares of rank differences and the WMW contains 
only first-order terms.

See the Wikipedia article [Mann-Whitney U 
test|https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test] for formulas 
and background information. At this point, I am proposing only to compute the 
rank sum statistic, not to implement the significance test.


> Compute Wilcoxon-Mann-Whitney rank sum statistic
> ------------------------------------------------
>
>                 Key: SPARK-12815
>                 URL: https://issues.apache.org/jira/browse/SPARK-12815
>             Project: Spark
>          Issue Type: New Feature
>          Components: ML, MLlib
>            Reporter: Robert Dodier
>            Priority: Minor
>
> The Wilcoxon-Mann-Whitney rank sum statistic (also known by other 
> permutations of those names) is a useful assessment of relevance of an input 
> field for a classification problem. As such it would nice to have in ML or 
> MLlib (I don't know what's a more suitable package for it).
> I have created a Spark package, 
> [spark-wilcoxon|http://spark-packages.org/package/robert-dodier/spark-wilcoxon],
>  to demonstrate an implementation. If there is interest in this issue, I'll 
> create a pull request. spark-wilcoxon computes the scaled rank sum statistic 
> {{U/(n0*n1)}}, where {{U}} is the rank sum statistic and {{n0}} and {{n1}} 
> are the numbers of data in class 0 and class 1, respectively.
> There exists already the Spearman rank correlation statistic in MLlib (in 
> ...mllib.stat.correlation.SpearmanCorrelation) but that is not equivalent to 
> the WMW statistic -- the one cannot be derived from the other because the 
> Spearman correlation contains squares of rank differences and the WMW 
> contains only first-order terms.
> See the Wikipedia article [Mann-Whitney U 
> test|https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test] for formulas 
> and background information. At this point, I am proposing only to compute the 
> rank sum statistic, not to implement the significance test.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to