当前位置: 首页>>代码示例>>Java>>正文


Java FleissKappaAgreement类代码示例

本文整理汇总了Java中org.dkpro.statistics.agreement.coding.FleissKappaAgreement的典型用法代码示例。如果您正苦于以下问题:Java FleissKappaAgreement类的具体用法?Java FleissKappaAgreement怎么用?Java FleissKappaAgreement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FleissKappaAgreement类属于org.dkpro.statistics.agreement.coding包,在下文中一共展示了FleissKappaAgreement类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testAgreement

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
/***/
public void testAgreement() {
	ICodingAnnotationStudy study = createExample();

	FleissKappaAgreement kappa = new FleissKappaAgreement(study);
	assertEquals(0.84, kappa.calculateObservedAgreement(), 0.01);
	assertEquals(0.20, kappa.calculateExpectedAgreement(), 0.01);
	assertEquals(0.80, kappa.calculateAgreement(), 0.01);
	
	assertEquals(1.00, kappa.calculateCategoryAgreement("INP"), 0.01);
	assertEquals(1.00, kappa.calculateCategoryAgreement("JJ"), 0.01);
	assertEquals(1.00, kappa.calculateCategoryAgreement("MD"), 0.01);
	assertEquals(0.48, kappa.calculateCategoryAgreement("NN"), 0.01);
	assertEquals(1.00, kappa.calculateCategoryAgreement("PRP"), 0.01);
	assertEquals(0.56, kappa.calculateCategoryAgreement("RB"), 0.01);
	assertEquals(0.67, kappa.calculateCategoryAgreement("UH"), 0.01);
	assertEquals(0.29, kappa.calculateCategoryAgreement("VB"), 0.01);
	assertEquals(-0.02, kappa.calculateCategoryAgreement("VBP"), 0.01);
}
 
开发者ID:dkpro,项目名称:dkpro-statistics,代码行数:20,代码来源:Mieskes2009Test.java

示例2: testAgreement

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
/***/
public void testAgreement() {
	ICodingAnnotationStudy study = createExample();
	assertEquals(30, study.getItemCount());
			
	FleissKappaAgreement kappa = new FleissKappaAgreement(study);
	assertEquals(0.5556, kappa.calculateObservedAgreement(), 0.001);
	assertEquals(0.2201, kappa.calculateExpectedAgreement(), 0.001);
	double agreement = kappa.calculateAgreement();
	assertEquals(0.430, agreement, 0.001);
	
	// Var = 0.000759 = 2/n*m(m-1) * (AE - (2m-3)AE^2 + 2(m-2)AE / (1-AE)^2)
	// SE = 0.028
	//TODO
	/*double se = raw.standardError(agreement);
	double[] ci = raw.confidenceInterval(agreement, se, RawAgreement.CONFIDENCE_95);
	assertEquals(0.028, se, 0.001);
	assertEquals(0.610, ci[0], 0.001);
	assertEquals(0.789, ci[1], 0.001);*/		
}
 
开发者ID:dkpro,项目名称:dkpro-statistics,代码行数:21,代码来源:Fleiss1971Test.java

示例3: testExample

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
/***/
public void testExample() {
	ICodingAnnotationStudy study = createExample();
			
	// Generalized percentage of agreement.
	PercentageAgreement pa = new PercentageAgreement(study);
	double agreement = pa.calculateAgreement();
	assertEquals(0.533, agreement, 0.001);
	//TODO
	/*double se = poa.standardError(agreement);
	double[] ci = poa.confidenceInterval(agreement, se, RawAgreement.CONFIDENCE_95);
	assertEquals(0.045, se, 0.001);
	assertEquals(0.610, ci[0], 0.001);
	assertEquals(0.789, ci[1], 0.001);*/		
	
	// Fleiss' multi-pi.
	FleissKappaAgreement pi = new FleissKappaAgreement(study);
	assertEquals(0.533, pi.calculateObservedAgreement(), 0.001);
	assertEquals(0.508, pi.calculateExpectedAgreement(), 0.001);
	agreement = pi.calculateAgreement();
	assertEquals(0.049, agreement, 0.001);
}
 
开发者ID:dkpro,项目名称:dkpro-statistics,代码行数:23,代码来源:MultiRaterAgreementTest.java

示例4: testExample1

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
/***/
public void testExample1() {
	ICodingAnnotationStudy study = createExample1();
			
	FleissKappaAgreement pi = new FleissKappaAgreement(study);
	assertEquals(0.67, pi.calculateObservedAgreement(), 0.01);
	assertEquals(0.50, pi.calculateExpectedAgreement(), 0.01);
	assertEquals(0.33, pi.calculateAgreement(), 0.01);
	
	RandolphKappaAgreement rk = new RandolphKappaAgreement(study);
	assertEquals(0.33, rk.calculateAgreement(), 0.01);		
}
 
开发者ID:dkpro,项目名称:dkpro-statistics,代码行数:13,代码来源:Randolph2005Test.java

示例5: testExample2

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
/***/
public void testExample2() {
	ICodingAnnotationStudy study = createExample2();
			
	FleissKappaAgreement pi = new FleissKappaAgreement(study);
	assertEquals(-0.2, pi.calculateAgreement(), 0.01);
	
	RandolphKappaAgreement rk = new RandolphKappaAgreement(study);
	assertEquals(0.33, rk.calculateAgreement(), 0.01);
	
}
 
开发者ID:dkpro,项目名称:dkpro-statistics,代码行数:12,代码来源:Randolph2005Test.java

示例6: testCategoryAgreement

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
/***/
public void testCategoryAgreement() {
	ICodingAnnotationStudy study = createExample();
	
	ICategorySpecificAgreement catAgreement = new FleissKappaAgreement(study);
	assertEquals(0.248, catAgreement.calculateCategoryAgreement(1), 0.005);
	assertEquals(0.248, catAgreement.calculateCategoryAgreement(2), 0.005);
	assertEquals(0.517, catAgreement.calculateCategoryAgreement(3), 0.005);
	assertEquals(0.470, catAgreement.calculateCategoryAgreement(4), 0.005);
	assertEquals(0.565, catAgreement.calculateCategoryAgreement(5), 0.005);
}
 
开发者ID:dkpro,项目名称:dkpro-statistics,代码行数:12,代码来源:Fleiss1971Test.java

示例7: calculateAgreement

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
@Override
public Map<String, Double> calculateAgreement(MappedSet<String, String> targetTagsAndAtts) throws IOException, SAXException, MaeException {
    Map<String, Double> localMultiPi = new TreeMap<>();
    Map<String, CodingAnnotationStudy> studies = prepareLocalCodingStudies(targetTagsAndAtts);
    for (String attFullName : studies.keySet()) {
        localMultiPi.put(attFullName, (new FleissKappaAgreement(studies.get(attFullName))).calculateAgreement());
    }
    return localMultiPi;
}
 
开发者ID:keighrim,项目名称:mae-annotation,代码行数:10,代码来源:LocalMultiPiCalc.java

示例8: calculateAgreement

import org.dkpro.statistics.agreement.coding.FleissKappaAgreement; //导入依赖的package包/类
@Override
public Map<String, Double> calculateAgreement(MappedSet<String, String> targetTagsAndAtts) throws IOException, SAXException, MaeException {
    Map<String, Double> globalMultiPi = new TreeMap<>();
    CodingAnnotationStudy study = prepareGlobalCodingStudy(targetTagsAndAtts);
    double agreement = (new FleissKappaAgreement(study)).calculateAgreement();
    globalMultiPi.put("cross-tag_multi_pi", agreement);
    return globalMultiPi;
}
 
开发者ID:keighrim,项目名称:mae-annotation,代码行数:9,代码来源:GlobalMultiPiCalc.java


注:本文中的org.dkpro.statistics.agreement.coding.FleissKappaAgreement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。