Interface IDistanceFunction
- All Known Implementing Classes:
CachedDistanceFunction,IntervalDistanceFunction,MASISetAnnotationDistanceFunction,NominalDistanceFunction,OrdinalDistanceFunction,RatioDistanceFunction,SetAnnotationDistanceFunction,SquareDistanceFunction
public interface IDistanceFunction
Interface for a distance function to be used in any
IWeightedAgreement measure, such as
WeightedKappaAgreement or KrippendorffAlphaAgreement. These measures use the
distance function for quantifying the degree of disagreement between a pair of categories (i.e.,
two annotations assigned to a certain item by different raters). If annotation units are, for
instance, coded using integers, the distance function might assign a smaller distance to the
category pair (1, 2) then to the category pair (2, 9). See implementations of this interface for
more detailed examples.- Author:
- Christian M. Meyer
- See Also:
IWeightedAgreement,WeightedKappaAgreement,KrippendorffAlphaAgreement
-
Method Summary
Modifier and Type Method Description doublemeasureDistance(IAnnotationStudy study, java.lang.Object category1, java.lang.Object category2)Returns a distance value for the given pair of categories used within the given annotation study.
-
Method Details
-
measureDistance
double measureDistance(IAnnotationStudy study, java.lang.Object category1, java.lang.Object category2)Returns a distance value for the given pair of categories used within the given annotation study. Normally, the measure should return a distance of 0 if, and only if, the two categories are equal and a positive number otherwise.
-