public class OrdinalDistanceFunction extends Object implements IDistanceFunction
IDistanceFunction
interface for scoring the
distance between ordinal-scaled categories. That is to say, categories
represent ranks, such as the values on a Likert scale. A typical example is
FULLY AGREE, RATHER AGREE, UNDECIDED, RATHER DISAGREE, FULLY DISAGREE. Note
that one cannot easily say that the difference between FULLY AGREE and
RATHER AGREE is equal. The intuition of the ordinal distance is function
is rather to count the number ranks in between a pair of given ranks.
Consider the example by Krippendorff (1980): 10 units are assigned the
ranks 1, 2, 3, 3, 4, 4, 4, 4, 5, 10. Then intuitively, the difference
should be much smaller between 1 and 3 then between 3 and 5. In the case
of uniform frequencies of the ranks (e.g., 1, 1, 2, 2, 3, 3, 4, 4), the
ordinal distance function equals the IntervalDistanceFunction
.
Mathematically, the ordinal scale only allows for the equality and
comparison operations, but prohibits addition and multiplication.
The distance function assumes the ranks to be of type integer. For
other category types, the distance function falls back to a
NominalDistanceFunction
.IDistanceFunction
Constructor and Description |
---|
OrdinalDistanceFunction() |
Modifier and Type | Method and Description |
---|---|
double |
measureDistance(IAnnotationStudy study,
Object category1,
Object category2)
Returns a distance value for the given pair of categories used within
the given annotation study.
|
public double measureDistance(IAnnotationStudy study, Object category1, Object category2)
IDistanceFunction
measureDistance
in interface IDistanceFunction
Copyright © 2011–2015 Ubiquitous Knowledge Processing (UKP) Lab. All rights reserved.