public class Distance extends Object
| Constructor and Description |
|---|
Distance() |
| Modifier and Type | Method and Description |
|---|---|
static double |
correlationOfStandardized(double[] xe,
double[] ye)
Highly optimized implementation of the Pearson correlation.
|
static double |
correlationOfStandardized(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
Like correlationofNormedFast, but takes DoubleArrayLists as inputs, handles missing values correctly, and does
more error checking.
|
static double |
euclDistance(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
Calculate the Euclidean distance between two vectors.
|
static double |
manhattanDistance(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
Calculate the Manhattan distance between two vectors.
|
static double |
spearmanRankCorrelation(cern.colt.list.DoubleArrayList x)
Convenience function to compute the rank correlation when we just want to know if the values are "in order".
|
static double |
spearmanRankCorrelation(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
Spearman Rank Correlation.
|
public static double correlationOfStandardized(double[] xe,
double[] ye)
xe - A standardized vectorye - A standardized vectorpublic static double correlationOfStandardized(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
x - A standardized vectory - A standardized vectorpublic static double euclDistance(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
x - DoubleArrayListy - DoubleArrayListpublic static double manhattanDistance(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
x - DoubleArrayListy - DoubleArrayListpublic static double spearmanRankCorrelation(cern.colt.list.DoubleArrayList x)
x - public static double spearmanRankCorrelation(cern.colt.list.DoubleArrayList x,
cern.colt.list.DoubleArrayList y)
x - DoubleArrayListy - DoubleArrayListCopyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.