From b783f7bb1533b3bbae11863f0f132b22ac5a2c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=C3=B4nio=20C=C3=A2ndido?= Date: Wed, 27 Sep 2017 15:33:32 -0300 Subject: [PATCH] - Bugfix at Measures.crps --- pyFTS/benchmarks/Measures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyFTS/benchmarks/Measures.py b/pyFTS/benchmarks/Measures.py index f0b2d09..e777362 100644 --- a/pyFTS/benchmarks/Measures.py +++ b/pyFTS/benchmarks/Measures.py @@ -231,13 +231,13 @@ def crps(targets, densities): l = len(densities.bins) n = 1 Fa = heavyside_cdf(densities.bins, targets) - _crps = sum([(densities.cdf(val) - Fa[val][0]) ** 2 for val in densities.bins]) + _crps = sum([(densities.cummulative(val) - Fa[val][0]) ** 2 for val in densities.bins]) elif isinstance(densities, list): l = len(densities[0].bins) n = len(densities) Fa = heavyside_cdf(densities[0].bins, targets) for df in densities: - _crps += sum([(df.cdf(val) - Fa[val][0]) ** 2 for val in df.bins]) + _crps += sum([(df.cummulative(val) - Fa[val][0]) ** 2 for val in df.bins]) return _crps / float(l * n)