From c179a28be2a1dc4e698a82a5ca5f2aa7724818bf Mon Sep 17 00:00:00 2001 From: Alexander Gawrilow Date: Wed, 31 Jul 2019 15:31:26 +0200 Subject: [PATCH] fix bug in performance metrics --- python/fbprophet/diagnostics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/fbprophet/diagnostics.py b/python/fbprophet/diagnostics.py index d5dffc6..dcbe927 100644 --- a/python/fbprophet/diagnostics.py +++ b/python/fbprophet/diagnostics.py @@ -238,7 +238,7 @@ def performance_metrics(df, metrics=None, rolling_window=0.1): valid_metrics = ['mse', 'rmse', 'mae', 'mape', 'mdape', 'coverage'] if metrics is None: metrics = valid_metrics - if ('yhat_lower' not in df) or ('yhat_upper' not in df) and ('coverage' in metrics): + if ('yhat_lower' not in df or 'yhat_upper' not in df) and ('coverage' in metrics): metrics.remove('coverage') if len(set(metrics)) != len(metrics): raise ValueError('Input metrics must be a list of unique values')