public class RankingErrorCalculator
extends java.lang.Object
correct pairwise comparisons
) or in terms of a reference ranking (such preference information is called correct ranking
).
The rankings are considered to be weak orders.Modifier and Type | Field | Description |
---|---|---|
static int |
ARG_MAX |
Flag used to indicate that error is calculated in the way that corresponds to using arg max as error minimizator at population level
|
static boolean |
DEFAULT_PRESERVE_CORRECT_INDIFFERENCE_RELATION |
Default value of
preserveCorrectIndifferenceRelation . |
static int |
KENDALL |
Flag used to indicate that error is calculated using Kendall's tau.
|
static int |
MEDIAN |
Flag used to indicate that error is calculated in the way that corresponds to using median as error minimizator at population level
|
boolean |
preserveCorrectIndifferenceRelation |
Tells if an error should be accounted when correct indifference relation is not preserved in the calculated ranking (weak order).
|
Constructor | Description |
---|---|
RankingErrorCalculator() |
Sole constructor
|
Modifier and Type | Method | Description |
---|---|---|
double |
calculateRankingError(PairwiseComparisons correctPairwiseComparisons,
SimpleRanking ranking) |
Calculates error of given linear ranking (weak order) with respect to given set of correct pairwise comparisons.
|
double |
calculateRankingError(PairwiseComparisons correctPairwiseComparisons,
SimpleRanking ranking,
PairOfIndices[] pairsThatCannotBePreservedInPreferenceRelation) |
Calculates error of given linear ranking (weak order) with respect to given set of correct pairwise comparisons.
|
double |
calculateRankingError(SimpleRanking correctRanking,
SimpleRanking ranking) |
Calculates error of given linear ranking (weak order) with respect to given correct linear ranking (correct weak order).
|
double |
calculateRankingError(SimpleRanking correctRanking,
SimpleRanking ranking,
PairOfIndices[] pairsThatCannotBePreservedInPreferenceRelation) |
Calculates error of given linear ranking (weak order) with respect to given correct linear ranking (correct weak order).
|
int |
getErrorMeasure() |
Gets used error measure
|
void |
setErrorMeasure(int errorMeasure) |
Sets error measure
|
public static final boolean DEFAULT_PRESERVE_CORRECT_INDIFFERENCE_RELATION
preserveCorrectIndifferenceRelation
.public boolean preserveCorrectIndifferenceRelation
public static final int MEDIAN
public static final int ARG_MAX
public static final int KENDALL
public void setErrorMeasure(int errorMeasure)
public int getErrorMeasure()
public double calculateRankingError(PairwiseComparisons correctPairwiseComparisons, SimpleRanking ranking)
correctPairwiseComparisons
- set of correct pairwise comparisonsranking
- ranking of objectspublic double calculateRankingError(PairwiseComparisons correctPairwiseComparisons, SimpleRanking ranking, PairOfIndices[] pairsThatCannotBePreservedInPreferenceRelation)
correctPairwiseComparisons
- set of correct pairwise comparisonsranking
- ranking of objectspairsThatCannotBePreservedInPreferenceRelation
- array storing pairs of objects' indices for pairs of objects
that cannot be reassigned to preference relation (which implies that inverted pairs of objects cannot be reassigned to inverse preference relation).
This is because in each such pair, the second object dominates the first one. This array is not used if it is null
or empty.public double calculateRankingError(SimpleRanking correctRanking, SimpleRanking ranking)
correctRanking
- correct ranking of objectsranking
- ranking of objectspublic double calculateRankingError(SimpleRanking correctRanking, SimpleRanking ranking, PairOfIndices[] pairsThatCannotBePreservedInPreferenceRelation)
correctRanking
- correct ranking of objectsranking
- ranking of objectspairsThatCannotBePreservedInPreferenceRelation
- array storing pairs of objects' indices for pairs of objects
that cannot be reassigned to preference relation (which implies that inverted pairs of objects cannot be reassigned to inverse preference relation).
This is because in each such pair, the second object dominates the first one. This array is not used if it is null
or empty.