CTable Class

CTable Class

class CTable

Represent a contingency table / confusion matrix for a single code.

classmethod CTable.add(pri_value, rel_value)

Increment the table value at the given combination by one. See computeKappa for automatically computing kappa scores.

Parameter Type Description
pri_value String Value for primary coder.
rel_value String Value for reliability coder.



classmethod CTable.ef(idx)

Return the expected frequency of agreement by chance for the given index.

Parameter Type Description
idx Integer Index of code (starting at zero).
classmethod CTable.efs()

Return the sum of the expected frequency of agreement by chance for all indices in table.

classmethod CTable.kappa()

Compute kappa using table values.

classmethod CTable.total()

Return the sum of all elements in table.

classmethod CTable.to_s()

Return formateed string to display the table.