Add test for disabling uncertainty

This commit is contained in:
Ryan Nazareth 2019-11-02 20:45:19 +00:00 committed by Ben Letham
parent ca9a49d328
commit c9e3a83188

View file

@ -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]