mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-18 08:53:42 +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):
|
def test_cross_validation_uncertainty_disabled(self):
|
||||||
df = self.__df.copy()
|
df = self.__df.copy()
|
||||||
m = Prophet(uncertainty_samples=0)
|
for uncertainty in [0, False]:
|
||||||
m.fit(df)
|
m = Prophet(uncertainty_samples=uncertainty)
|
||||||
df_cv = diagnostics.cross_validation(
|
m.fit(df)
|
||||||
m, horizon='4 days', period='4 days', initial='115 days')
|
df_cv = diagnostics.cross_validation(
|
||||||
self.assertListEqual(['ds', 'yhat', 'y', 'cutoff'], df_cv.columns.tolist())
|
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):
|
def test_performance_metrics(self):
|
||||||
m = Prophet()
|
m = Prophet()
|
||||||
|
|
|
||||||
|
|
@ -98,12 +98,13 @@ class TestProphet(TestCase):
|
||||||
train = DATA.head(N // 2)
|
train = DATA.head(N // 2)
|
||||||
future = DATA.tail(N // 2)
|
future = DATA.tail(N // 2)
|
||||||
|
|
||||||
m = Prophet(uncertainty_samples=0)
|
for uncertainty in [0, False]:
|
||||||
m.fit(train)
|
m = Prophet(uncertainty_samples=uncertainty)
|
||||||
fcst = m.predict(future)
|
m.fit(train)
|
||||||
self.assertListEqual(['ds', 'trend', 'additive_terms', 'weekly',
|
fcst = m.predict(future)
|
||||||
'multiplicative_terms', 'yhat'], fcst.columns.tolist())
|
self.assertListEqual(['ds', 'trend', 'additive_terms', 'weekly',
|
||||||
|
'multiplicative_terms', 'yhat'],
|
||||||
|
fcst.columns.tolist())
|
||||||
|
|
||||||
def test_setup_dataframe(self):
|
def test_setup_dataframe(self):
|
||||||
m = Prophet()
|
m = Prophet()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue