Top Description Methods
org.apache.commons.math3.stat.ranking

public Interface RankingAlgorithm

Known Direct Implementers
org.apache.commons.math3.stat.ranking.NaturalRanking

Interface representing a rank transformation.
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public double[]

Returns:

an array of ranks corresponding to the elements of the input array
rank
(double[]
array of data to be ranked
data
)

Performs a rank transformation on the input data, returning an array of ranks.

Method Detail

rankback to summary
public double[] rank(double[] data)

Performs a rank transformation on the input data, returning an array of ranks.

Ranks should be 1-based - that is, the smallest value returned in an array of ranks should be greater than or equal to one, rather than 0. Ranks should in general take integer values, though implementations may return averages or other floating point values to resolve ties in the input data.

Parameters
data:double[]

array of data to be ranked

Returns:double[]

an array of ranks corresponding to the elements of the input array