test_prophet.py (prophet-1.0) | : | test_prophet.py (prophet-1.1) | ||
---|---|---|---|---|
skipping to change at line 126 | skipping to change at line 126 | |||
prophet = Prophet(changepoints=['2013-06-06']) | prophet = Prophet(changepoints=['2013-06-06']) | |||
forecaster = prophet | forecaster = prophet | |||
forecaster.fit(train) | forecaster.fit(train) | |||
forecaster.predict(future) | forecaster.predict(future) | |||
def test_fit_predict_duplicates(self): | def test_fit_predict_duplicates(self): | |||
N = DATA.shape[0] | N = DATA.shape[0] | |||
train1 = DATA.head(N // 2).copy() | train1 = DATA.head(N // 2).copy() | |||
train2 = DATA.head(N // 2).copy() | train2 = DATA.head(N // 2).copy() | |||
train2['y'] += 10 | train2['y'] += 10 | |||
train = train1.append(train2) | train = pd.concat([train1, train2]) | |||
future = pd.DataFrame({'ds': DATA['ds'].tail(N // 2)}) | future = pd.DataFrame({'ds': DATA['ds'].tail(N // 2)}) | |||
forecaster = Prophet() | forecaster = Prophet() | |||
forecaster.fit(train) | forecaster.fit(train) | |||
forecaster.predict(future) | forecaster.predict(future) | |||
def test_fit_predict_constant_history(self): | def test_fit_predict_constant_history(self): | |||
N = DATA.shape[0] | N = DATA.shape[0] | |||
train = DATA.head(N // 2).copy() | train = DATA.head(N // 2).copy() | |||
train['y'] = 20 | train['y'] = 20 | |||
future = pd.DataFrame({'ds': DATA['ds'].tail(N // 2)}) | future = pd.DataFrame({'ds': DATA['ds'].tail(N // 2)}) | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |