Constructor and Description |
---|
SpearmanRankCorrelation() |
Modifier and Type | Method and Description |
---|---|
double |
calculateRho(double[] x,
double[] y)
Calculates Spearman's rho (Pearson's correlation coefficient on ranked data).
|
double |
calculateSpearmanRank(double[][] data)
Calculates Spearman's Rank Correlation Coefficient (Spearman's rho) for
two images.
|
<T extends RealType<T>> |
calculateSpearmanRank(TwinCursor<T> cursor)
Calculates Spearman's Rank Correlation Coefficient (Spearman's rho) for
two images.
|
void |
execute(DataContainer<T> container)
Executes the previously initialized
Algorithm . |
int |
getSpearmanDF(int n)
Returns degrees of freedom for Spearman's rank correlation.
|
double |
getTStatistic(double rho,
int n)
Returns associated T-Statistic for Spearman's rank correlation.
|
void |
processResults(ResultHandler<T> handler)
A method to give the algorithm the opportunity to let
its results being processed by the passed handler.
|
double[] |
rankValues(double[] sortedVals)
Returns sorted rankings for a list of sorted values.
|
addWarning, getName, getWarnings
public void execute(DataContainer<T> container) throws MissingPreconditionException
Algorithm
Algorithm
.public <T extends RealType<T>> double calculateSpearmanRank(TwinCursor<T> cursor)
cursor
- A TwinCursor that iterates over two imagespublic double calculateSpearmanRank(double[][] data)
data
- A 2D array containing the data to be rankedpublic int getSpearmanDF(int n)
n
- - N (number of data pairs)public double getTStatistic(double rho, int n)
rho
- - Spearman's rhon
- - N (number of data pairs)public double[] rankValues(double[] sortedVals)
sortedVals
- - The sorted absolute valuespublic double calculateRho(double[] x, double[] y)
x
- - One array of rankings (may include ties)y
- - ditto.public void processResults(ResultHandler<T> handler)
Algorithm
processResults
in class Algorithm<T extends RealType<T>>
handler
- The ResultHandler to process the results.Copyright © 2015–2021 Fiji. All rights reserved.