CTable Class

CTable Class

class CTable

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

classmethod 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.

Returns

None.

classmethod 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 efs()

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

classmethod kappa()

Compute kappa using table values.

classmethod total()

Return the sum of all elements in table.

classmethod to_s()

Return formateed string to display the table.