mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-07-29 20:14:08 +00:00
Add second check for uncertainty=False
This commit is contained in:
parent
3134c7ff5a
commit
da05c039ee
2 changed files with 13 additions and 11 deletions
|
|
@ -107,11 +107,12 @@ class TestDiagnostics(TestCase):
|
|||
|
||||
def test_cross_validation_uncertainty_disabled(self):
|
||||
df = self.__df.copy()
|
||||
m = Prophet(uncertainty_samples=0)
|
||||
m.fit(df)
|
||||
df_cv = diagnostics.cross_validation(
|
||||
m, horizon='4 days', period='4 days', initial='115 days')
|
||||
self.assertListEqual(['ds', 'yhat', 'y', 'cutoff'], df_cv.columns.tolist())
|
||||
for uncertainty in [0, False]:
|
||||
m = Prophet(uncertainty_samples=uncertainty)
|
||||
m.fit(df)
|
||||
df_cv = diagnostics.cross_validation(
|
||||
m, horizon='4 days', period='4 days', initial='115 days')
|
||||
self.assertListEqual(['ds', 'yhat', 'y', 'cutoff'], df_cv.columns.tolist())
|
||||
|
||||
def test_performance_metrics(self):
|
||||
m = Prophet()
|
||||
|
|
|
|||
|
|
@ -98,12 +98,13 @@ class TestProphet(TestCase):
|
|||
train = DATA.head(N // 2)
|
||||
future = DATA.tail(N // 2)
|
||||
|
||||
m = Prophet(uncertainty_samples=0)
|
||||
m.fit(train)
|
||||
fcst = m.predict(future)
|
||||
self.assertListEqual(['ds', 'trend', 'additive_terms', 'weekly',
|
||||
'multiplicative_terms', 'yhat'], fcst.columns.tolist())
|
||||
|
||||
for uncertainty in [0, False]:
|
||||
m = Prophet(uncertainty_samples=uncertainty)
|
||||
m.fit(train)
|
||||
fcst = m.predict(future)
|
||||
self.assertListEqual(['ds', 'trend', 'additive_terms', 'weekly',
|
||||
'multiplicative_terms', 'yhat'],
|
||||
fcst.columns.tolist())
|
||||
|
||||
def test_setup_dataframe(self):
|
||||
m = Prophet()
|
||||
|
|
|
|||
Loading…
Reference in a new issue