Skip to content

Commit

Permalink
removed perods_added logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MaiBe-ctrl committed Jun 17, 2024
1 parent 973edbc commit 9f7d1d7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions neuralprophet/forecaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1181,8 +1181,8 @@ def predict(self, df: pd.DataFrame, decompose: bool = True, raw: bool = False):
quantiles=self.config_train.quantiles,
components=components,
)
if periods_added[df_name] > 0:
fcst = fcst[:-1]
# if periods_added[df_name] > 0:
# fcst = fcst[:-1]
else:
fcst = _reshape_raw_predictions_to_forecst_df(
df=df_i,
Expand All @@ -1196,9 +1196,10 @@ def predict(self, df: pd.DataFrame, decompose: bool = True, raw: bool = False):
quantiles=self.config_train.quantiles,
config_lagged_regressors=self.config_lagged_regressors,
)
if periods_added[df_name] > 0:
fcst = fcst[: -periods_added[df_name]]
# if periods_added[df_name] > 0:
# fcst = fcst[: -1]
forecast = pd.concat((forecast, fcst), ignore_index=True)

df = df_utils.return_df_in_original_format(forecast, received_ID_col, received_single_time_series)
self.predict_steps = self.n_forecasts
return df
Expand Down

0 comments on commit 9f7d1d7

Please sign in to comment.