From c9e3a83188f5346feeec78fea101a13002d6e2d5 Mon Sep 17 00:00:00 2001 From: Ryan Nazareth Date: Sat, 2 Nov 2019 20:45:19 +0000 Subject: [PATCH] Add test for disabling uncertainty --- python/fbprophet/tests/test_prophet.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/python/fbprophet/tests/test_prophet.py b/python/fbprophet/tests/test_prophet.py index 8dc297a..4675824 100644 --- a/python/fbprophet/tests/test_prophet.py +++ b/python/fbprophet/tests/test_prophet.py @@ -93,6 +93,19 @@ class TestProphet(TestCase): fcst = m.predict(future) self.assertEqual(fcst['yhat'].values[-1], 0) + def test_fit_predict_uncertainty_disabled(self): + N = DATA.shape[0] + train = DATA.head(N // 2) + future = DATA.tail(N // 2) + + m = Prophet(uncertainty_samples=0) + m.fit(train) + fcst = m.predict(future) + self.assertNotIn('yhat_lower', list(fcst.columns)) + self.assertNotIn('yhat_upper', list(fcst.columns)) + self.assertNotIn('trend_lower', list(fcst.columns)) + self.assertNotIn('trend_upper', list(fcst.columns)) + def test_setup_dataframe(self): m = Prophet() N = DATA.shape[0]