agreement_numerical()¶
- audpsychometric.agreement_numerical(ratings, minimum, maximum, *, axis=1)[source]¶
Confidence score for numerical ratings.
\[\text{agreement}(\text{ratings}) = \max( 0, 1 - \frac{\text{std}(\text{ratings})} {\text{maximum} - \frac{1}{2} (\text{minimum} + \text{maximum})} )\]with \(\text{std}\) the population standard deviation of the ratings.
nan
values are ignored per item.- Parameters
ratings (
Sequence
) – ratings. When given as a 1-dimensional array, it is treated as a row vectorminimum (
float
) – lower limit of possible rating valuemaximum (
float
) – upper limit of possible rating valueaxis (
int
) – axis along which the agreement is computed. A value of1
assumes stimuli as rows and raters as columns
- Return type
- Returns
numerical agreement score(s)
Examples
>>> agreement_numerical([0, 1], 0, 1) 0.0 >>> agreement_numerical([0, 1], 0, 2) 0.5 >>> agreement_numerical([0, 0], 0, 1) 1.0 >>> agreement_numerical([0, np.nan], 0, 1) 1.0