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_AttrsFields 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 TypeMethodDescriptionvoidaddExample(double[] real, double[] predicted) voidaddExample(DataTuple real, DataTuple pred) doubleGives the average (=arithmetic mean) spearman rank correlation over all examples.doubleGives the average (=arithmetic mean) spearman rank correlation over all examples.doubleGives the variance of the harmonic mean of the rank correlation over all examplesdoublegetModelErrorComponent(int i) getName()InformationdoubleGives the variance of the arithmetic mean of the rank correlation over all examplesdoublegetSpearmanRankCorrelation(double[] a, double[] b) booleanShould this error be minimized (e.g.Methods inherited from class si.ijs.kt.clus.error.common.ClusNumericError
getAttrMethods 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:
addExamplein classClusNumericError
-
addExample
- Overrides:
addExamplein classClusError
-
getModelErrorComponent
public double getModelErrorComponent(int i) - Overrides:
getModelErrorComponentin 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:ClusErrorInformation -
getSpearmanRankCorrelation
public double getSpearmanRankCorrelation(double[] a, double[] b) -
getErrorClone
- Specified by:
getErrorClonein classClusError
-
shouldBeLow
public boolean shouldBeLow()Description copied from class:ClusErrorShould this error be minimized (e.g. RRSE) or maximized (e.g. accuracy)? True by default.- Specified by:
shouldBeLowin classClusError
-