Class KrippendorffAlphaAgreement
java.lang.Object
org.dkpro.statistics.agreement.DisagreementMeasure
org.dkpro.statistics.agreement.coding.WeightedAgreement
org.dkpro.statistics.agreement.coding.KrippendorffAlphaAgreement
- All Implemented Interfaces:
ICodingItemSpecificAgreement,IAgreementMeasure,ICategorySpecificAgreement,IChanceCorrectedDisagreement,IItemSpecificAgreement<ICodingAnnotationItem>,IWeightedAgreement
public class KrippendorffAlphaAgreement extends WeightedAgreement implements IChanceCorrectedDisagreement, ICategorySpecificAgreement, ICodingItemSpecificAgreement
Implementation of Krippendorff's (1980) alpha-measure for calculating a chance-corrected
inter-rater agreement for multiple raters with arbitrary distance/weighting functions. The basic
idea is to divide the estimated variance of within the items by the estimated total variance.
Before an inter-rater agreement can be calculated, an
References:
IDistanceFunction instance needs to
be assigned.References:
- Krippendorff, K.: Estimating the reliability, systematic error and random error of interval data. Educational and Psychological Measurement 30(1):61-70, 1970.
- Krippendorff, K.: Content Analysis: An Introduction to Its Methodology. 2nd edition, Thousand Oaks, CA: Sage Publications, 2004.
- Artstein, R. & Poesio, M.: Inter-Coder Agreement for Computational Linguistics. Computational Linguistics 34(4):555-596, 2008.
- Author:
- Christian M. Meyer
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Object,java.util.Map<java.lang.Object,java.lang.Double>>coincidenceMatrixFields inherited from class org.dkpro.statistics.agreement.coding.WeightedAgreement
distanceFunction, study -
Constructor Summary
Constructors Constructor Description KrippendorffAlphaAgreement(ICodingAnnotationStudy study, IDistanceFunction distanceFunction)Initializes the instance for the given annotation study. -
Method Summary
Modifier and Type Method Description doublecalculateCategoryAgreement(java.lang.Object category)Calculates the inter-rater agreement for the given category.doublecalculateExpectedDisagreement()Calculates the expected inter-rater agreement using the defined distance function to infer the assumed probability distribution.doublecalculateItemAgreement(ICodingAnnotationItem item)Calculates the inter-rater agreement for the given annotation item.doublecalculateObservedDisagreement()Returns the observed disagreement of an annotation study.Methods inherited from class org.dkpro.statistics.agreement.coding.WeightedAgreement
ensureDistanceFunction, getDistanceFunction, setDistanceFunctionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.dkpro.statistics.agreement.IAgreementMeasure
calculateAgreement
-
Field Details
-
coincidenceMatrix
protected java.util.Map<java.lang.Object,java.util.Map<java.lang.Object,java.lang.Double>> coincidenceMatrix
-
-
Constructor Details
-
KrippendorffAlphaAgreement
public KrippendorffAlphaAgreement(ICodingAnnotationStudy study, IDistanceFunction distanceFunction)Initializes the instance for the given annotation study. The study should never be null.
-
-
Method Details
-
calculateObservedDisagreement
public double calculateObservedDisagreement()Description copied from interface:IChanceCorrectedDisagreementReturns the observed disagreement of an annotation study. The observed disagreement is basically the proportion of annotation units that the raters disagree on divided by the number of units in the given study.- Specified by:
calculateObservedDisagreementin interfaceIChanceCorrectedDisagreement- Specified by:
calculateObservedDisagreementin classDisagreementMeasure
-
calculateExpectedDisagreement
public double calculateExpectedDisagreement()Calculates the expected inter-rater agreement using the defined distance function to infer the assumed probability distribution.- Specified by:
calculateExpectedDisagreementin interfaceIChanceCorrectedDisagreement- Overrides:
calculateExpectedDisagreementin classDisagreementMeasure- Throws:
java.lang.NullPointerException- if the annotation study is null.java.lang.ArithmeticException- if there are no items or raters in the annotation study.
-
calculateItemAgreement
Description copied from interface:IItemSpecificAgreementCalculates the inter-rater agreement for the given annotation item.- Specified by:
calculateItemAgreementin interfaceIItemSpecificAgreement<ICodingAnnotationItem>- See Also:
IItemSpecificAgreement
-
calculateCategoryAgreement
public double calculateCategoryAgreement(java.lang.Object category)Description copied from interface:ICategorySpecificAgreementCalculates the inter-rater agreement for the given category.- Specified by:
calculateCategoryAgreementin interfaceICategorySpecificAgreement- See Also:
ICategorySpecificAgreement
-