|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectutil.gen.SpearmanCorrelation
Calculates a Spearman correlation coefficient (rho), in the case of ties, averages the ranks and returns a Pearson correlation coefficient on the ranks.
Constructor Summary | |
SpearmanCorrelation()
|
Method Summary | |
double |
corrCoeff(float[] a,
float[] b)
This is the final step in calculating a Spearman Correlation coeff. |
RankedFloatArray |
getARFA()
|
RankedFloatArray |
getBRFA()
|
static void |
main(java.lang.String[] args)
|
RankedFloatArray |
rank(float[] f)
|
RankedFloatArray |
rankSamples(RankSample[] rs)
Ranks a sorted array of RankSample based on value. |
void |
setARFA(RankedFloatArray arfa)
|
void |
setBRFA(RankedFloatArray brfa)
|
double |
spearmanCorrelationCoefficient(float[] a,
float[] b)
Returns a Spearman Rank Correlation Coefficient (rho) between the two arrays. |
double |
spearmanCorrelationCoefficient(RankedFloatArray aRFA,
RankedFloatArray bRFA)
Returns a Spearman Rank Correlation Coefficient (rho) between the two arrays. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SpearmanCorrelation()
Method Detail |
public double spearmanCorrelationCoefficient(float[] a, float[] b)
public double spearmanCorrelationCoefficient(RankedFloatArray aRFA, RankedFloatArray bRFA)
public double corrCoeff(float[] a, float[] b)
a
- - a values converted to ranked and sorted by original indexb
- - ditto
Call correlate() if you don't have the ranks.public RankedFloatArray rank(float[] f)
public RankedFloatArray rankSamples(RankSample[] rs)
public static void main(java.lang.String[] args)
public RankedFloatArray getARFA()
public void setARFA(RankedFloatArray arfa)
public RankedFloatArray getBRFA()
public void setBRFA(RankedFloatArray brfa)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |