Formal Methods Project 2020-2021

Interrater Reliability

Author: Brian Woodcock

TASK: Prepare a dataset for the computation of interrater reliability for the classifications.

  1. [Explosion Step] For each classifier (a, b, c, d), explode their methods and subdisciplines classifications into indicator (1/0) variable columns. So, for each method-type and subdisc-type there will be four columns -- one for each classifier. Since level is an ordinal variable, it does not participate in this process.

  2. [Reduction Step] For each method-type and subdisc-type, combine the four classifier columns created in the previous task into two columns, in each row keeping just the two entries that have classifications since there will only ever be two (i.e., alternatively, dropping the two null entries per row since on any row there will be two null entries). The order in which the two entries kept on any row is assigned to the two new columns does not matter. The four level classification columns are reduced in the same manner.

Functions

Load Master Dataset

Create Hits DataFrame

Create Two Columns of Classifier Method Ratings for Each Method_Type

Create Two Columns of Classifier Level Ratings

Create Two Columns of Classifier Subdiscipline Ratings for Each Subdiscipline Type

Save

Preparation for Interrater Reliability

Add columns for logfam_1, logfam_2, probfam_1, probfam_2

Calculate Interrater Reliabilities -- Percent Agreement

Calculate Interrater Reliabilities -- Cohen's Kappa from Sklearn

Calculate Interrater Reliabilities -- Cohen's Kappa from Formula

Interrater Reliabilities Table

Reference:

Agreement Table