|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttools.math.SpearmanCoefficient
public class SpearmanCoefficient
Implements Spearman's rank correlation coefficient to calulate the
correlation between two given rows of data points. It is defined as the
Pearson coefficient
of the
rankings
of both data rows.
Constructor Summary | |
---|---|
SpearmanCoefficient()
Creates the Spearman rank coefficient object. |
Method Summary | |
---|---|
void |
feedData(Collection<Point> data)
Feeds a list of data points into the dataset. |
void |
feedData(float x,
float y)
Feeds one data point into the dataset |
void |
feedData(Point p)
Feeds one data point into the dataset |
float |
getCorrelationCoefficient()
Calculates Scorrelation coefficient for the current dataset. |
static float[] |
rankArray(Comparable<?>[] data)
Calculates the ranking for a given array of comparable objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpearmanCoefficient()
Method Detail |
---|
public void feedData(float x, float y)
CorrelationCoefficient
feedData
in interface CorrelationCoefficient
x
- data point's xy
- data point's ypublic void feedData(Collection<Point> data)
CorrelationCoefficient
feedData
in interface CorrelationCoefficient
data
- list of points
.public void feedData(Point p)
CorrelationCoefficient
feedData
in interface CorrelationCoefficient
p
- data point to be addedpublic float getCorrelationCoefficient()
getCorrelationCoefficient
in interface CorrelationCoefficient
public static float[] rankArray(Comparable<?>[] data)
data
- array of comparable objects to be ranked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |