Skip to content

Commit 6769902

Browse files
authored
Fix prophet test (#1173)
The new version of prophet (1.1) introduced breaking changes to the fit arguments. http://b/237327883
1 parent ad95fba commit 6769902

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_prophet.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
class TestProphet(unittest.TestCase):
99
def test_fit(self):
1010
train = pd.DataFrame({
11-
'ds': np.array(['2012-05-18', '2012-05-20']),
12-
'y': np.array([38.23, 21.25])
11+
'ds': np.array(['2012-05-18', '2012-05-19', '2012-05-20', '2012-05-21', '2012-05-22']),
12+
'y': np.array([38.23, 21.25, 20.18, 20.01, 19.02])
1313
})
1414

1515
forecaster = Prophet(mcmc_samples=1)
16-
forecaster.fit(train, control={'adapt_engaged': False})
16+
forecaster.fit(train, adapt_engaged=False)
17+
18+
self.assertEqual(len(train) + 1, len(forecaster.make_future_dataframe(periods=1)))

0 commit comments

Comments
 (0)