Package si.ijs.kt.clus.error
Class SpearmanRankCorrelationPerExample
java.lang.Object
si.ijs.kt.clus.error.common.ClusError
si.ijs.kt.clus.error.common.ClusNumericError
si.ijs.kt.clus.error.SpearmanRankCorrelationPerExample
- All Implemented Interfaces:
Serializable
This class computes the average spearman rank correlation over all target attributes.
Ties are not taken into account.
The spearman rank correlation is a measure for how well the rankings of the real values
correspond to the rankings of the predicted values.
This version of coefficient computes the correlation between multiple true/predicted target values
for a given example, and returns the average over all examples.
Some methods are missing.
- Author:
- beau, matejp
- See Also:
-
Field Summary
FieldsFields inherited from class si.ijs.kt.clus.error.common.ClusNumericError
m_Attrs
Fields inherited from class si.ijs.kt.clus.error.common.ClusError
DEFAULT_ERROR, DEFAULT_POSTFIX, DETAIL_ALWAYS_VISIBLE, DETAIL_NEVER_VISIBLE, DETAIL_SMALL, DETAIL_VERY_SMALL, m_Dim, m_Parent, RELATIVE_ERROR, RELATIVE_POSTFIX, TREE_ERROR, TREE_POSTFIX
-
Constructor Summary
ConstructorsConstructorDescriptionSpearmanRankCorrelationPerExample
(ClusErrorList par, NumericAttrType[] num, String info) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExample
(double[] real, double[] predicted) void
addExample
(DataTuple real, DataTuple pred) double
Gives the average (=arithmetic mean) spearman rank correlation over all examples.double
Gives the average (=arithmetic mean) spearman rank correlation over all examples.double
Gives the variance of the harmonic mean of the rank correlation over all examplesdouble
getModelErrorComponent
(int i) getName()
Informationdouble
Gives the variance of the arithmetic mean of the rank correlation over all examplesdouble
getSpearmanRankCorrelation
(double[] a, double[] b) boolean
Should this error be minimized (e.g.Methods inherited from class si.ijs.kt.clus.error.common.ClusNumericError
getAttr
Methods inherited from class si.ijs.kt.clus.error.common.ClusError
add, addExample, addInvalid, compute, computeLeafError, computeTreeErrorClusteringAbsolute, get_accuracy, get_auc, get_error_classif, get_precision, get_recall, getAdditionalInfo, getAdditionalInfoFormatted, getCoverage, getDetailLevel, getDimension, getErrorClone, getFormat, getModelError, getModelErrorAdditive, getModelErrorStandardError, getNbCover, getNbExamples, getNbTotal, getParent, getPrefix, isComputeForModel, isMultiLine, normalize, reset, setAdditionalInfo, setWeights, showDoubleArray, showDoubleArray, showDoubleArray, showModelError, showModelError, showRelativeModelError, updateFromGlobalMeasure
-
Field Details
-
RankCorrelations
-
-
Constructor Details
-
SpearmanRankCorrelationPerExample
-
SpearmanRankCorrelationPerExample
-
-
Method Details
-
addExample
public void addExample(double[] real, double[] predicted) - Specified by:
addExample
in classClusNumericError
-
addExample
- Overrides:
addExample
in classClusError
-
getModelErrorComponent
public double getModelErrorComponent(int i) - Overrides:
getModelErrorComponent
in classClusError
-
getAvgRankCorr
public double getAvgRankCorr()Gives the average (=arithmetic mean) spearman rank correlation over all examples.- Returns:
- average spearman rank correlation
-
getHarmonicAvgRankCorr
public double getHarmonicAvgRankCorr()Gives the average (=arithmetic mean) spearman rank correlation over all examples.- Returns:
- harmonic mean of spearman rank correlations for each example
-
getRankCorrVariance
public double getRankCorrVariance()Gives the variance of the arithmetic mean of the rank correlation over all examples- Returns:
- variance of the average rank correlation
-
getHarmonicRankCorrVariance
public double getHarmonicRankCorrVariance()Gives the variance of the harmonic mean of the rank correlation over all examples- Returns:
- variance of the average rank correlation
-
getName
Description copied from class:ClusError
Information -
getSpearmanRankCorrelation
public double getSpearmanRankCorrelation(double[] a, double[] b) -
getErrorClone
- Specified by:
getErrorClone
in classClusError
-
shouldBeLow
public boolean shouldBeLow()Description copied from class:ClusError
Should this error be minimized (e.g. RRSE) or maximized (e.g. accuracy)? True by default.- Specified by:
shouldBeLow
in classClusError
-