本文整理匯總了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);
}
示例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);*/
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}