Skip to content

Commit 150361d

Browse files
author
Oskar Triebe
committed
renamed make_future_dataframe
1 parent 7fdbddd commit 150361d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

neuralprophet/neural_prophet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def test(self, df):
619619
val_metrics_df = self._evaluate(loader)
620620
return val_metrics_df
621621

622-
def compose_prediction_df(self, df, events_df=None, future_periods=None, n_historic_predictions=0):
622+
def make_future_dataframe(self, df, events_df=None, future_periods=None, n_historic_predictions=0):
623623
assert n_historic_predictions >= 0
624624
if future_periods is not None:
625625
assert future_periods >= 0

neuralprophet/test_debug.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_trend(verbose=True):
3838
verbose=verbose,
3939
)
4040
m.fit(df)
41-
future = m.compose_prediction_df(df, future_periods=60, n_historic_predictions=len(df))
41+
future = m.make_future_dataframe(df, future_periods=60, n_historic_predictions=len(df))
4242
forecast = m.predict(df=future)
4343
if verbose:
4444
m.plot(forecast)
@@ -63,7 +63,7 @@ def test_ar_net(verbose=True):
6363
)
6464
m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts)
6565
m.fit(df, validate_each_epoch=True)
66-
future = m.compose_prediction_df(df, n_historic_predictions=len(df))
66+
future = m.make_future_dataframe(df, n_historic_predictions=len(df))
6767
forecast = m.predict(df=future)
6868
if verbose:
6969
m.plot_last_forecast(forecast, include_previous_forecasts=3)
@@ -90,7 +90,7 @@ def test_seasons(verbose=True):
9090
# seasonality_reg=10,
9191
)
9292
m.fit(df, validate_each_epoch=True)
93-
future = m.compose_prediction_df(df, n_historic_predictions=len(df), future_periods=365)
93+
future = m.make_future_dataframe(df, n_historic_predictions=len(df), future_periods=365)
9494
forecast = m.predict(df=future)
9595

9696
if verbose:
@@ -125,7 +125,7 @@ def test_lag_reg(verbose=True):
125125
m = m.add_regressor(name='C')
126126
# m.highlight_nth_step_ahead_of_each_forecast(m.n_forecasts)
127127
m.fit(df, validate_each_epoch=True)
128-
future = m.compose_prediction_df(df, n_historic_predictions=365)
128+
future = m.make_future_dataframe(df, n_historic_predictions=365)
129129
forecast = m.predict(future)
130130

131131
if verbose:
@@ -172,7 +172,7 @@ def test_events(verbose=True):
172172

173173
# create the test data
174174
history_df = m.create_df_with_events(df.iloc[100: 500, :].reset_index(drop=True), events_df)
175-
future = m.compose_prediction_df(df=history_df, events_df=events_df, future_periods=20, n_historic_predictions=3)
175+
future = m.make_future_dataframe(df=history_df, events_df=events_df, future_periods=20, n_historic_predictions=3)
176176
forecast = m.predict(df=future)
177177
if verbose:
178178
print(m.model.event_params)
@@ -193,7 +193,7 @@ def test_predict(verbose=True):
193193
daily_seasonality=False,
194194
)
195195
m.fit(df)
196-
future = m.compose_prediction_df(df, future_periods=None, n_historic_predictions=10)
196+
future = m.make_future_dataframe(df, future_periods=None, n_historic_predictions=10)
197197
forecast = m.predict(future)
198198
if verbose:
199199
m.plot_last_forecast(forecast, include_previous_forecasts=10)
@@ -215,7 +215,7 @@ def test_plot(verbose=True):
215215
)
216216
m.fit(df)
217217
m.highlight_nth_step_ahead_of_each_forecast(7)
218-
future = m.compose_prediction_df(df, n_historic_predictions=10)
218+
future = m.make_future_dataframe(df, n_historic_predictions=10)
219219
forecast = m.predict(future)
220220
# print(future.to_string())
221221
# print(forecast.to_string())

0 commit comments

Comments
 (0)