From b9605385581d59a07cb39564ac47ec2e52e11f6b Mon Sep 17 00:00:00 2001 From: Grotrek Date: Mon, 2 Apr 2018 05:04:25 +0300 Subject: [PATCH] Fix ordinal metric (#3) --- krippendorff/krippendorff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/krippendorff/krippendorff.py b/krippendorff/krippendorff.py index 1cfb6c2..f1946a9 100644 --- a/krippendorff/krippendorff.py +++ b/krippendorff/krippendorff.py @@ -17,7 +17,7 @@ def _nominal_metric(v1, v2, **_kwargs): def _ordinal_metric(_v1, _v2, i1, i2, n_v): """Metric for ordinal data.""" - return np.sum(n_v[i1:(i2 + 1)]) - (n_v[i1] + n_v[i2]) / 2 + return (np.sum(n_v[i1:(i2 + 1)]) - (n_v[i1] + n_v[i2]) / 2) ** 2 def _interval_metric(v1, v2, **_kwargs):