add hints for changes
This commit is contained in:
parent
2055ee5c8b
commit
14c4efedf7
@ -238,6 +238,7 @@ def _process_sales(
|
||||
too_few_month_points: bool = True
|
||||
forecast: pd.DataFrame | None = None
|
||||
|
||||
# change sliding window to monthly basis
|
||||
for start_year in range(current_year - 4, first_year - 1, -1):
|
||||
train = cast(
|
||||
pd.DataFrame,
|
||||
@ -274,9 +275,10 @@ def _process_sales(
|
||||
best_score_mae = error
|
||||
best_score_r2 = cast(float, r2_score(y_test, y_pred))
|
||||
best_start_year = start_year
|
||||
# overwrite with pre-defined prognosis DF
|
||||
forecast = test.copy()
|
||||
forecast.loc[:, "vorhersage"] = y_pred
|
||||
|
||||
# remove
|
||||
if forecast is not None:
|
||||
forecast = forecast.drop(SALES_FEAT, axis=1).reset_index(drop=True)
|
||||
best_score_mae = best_score_mae if not math.isinf(best_score_mae) else None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user