-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with predictions when using step_scale() in recipe #256
Comments
Normally I scale the target outside of the recipe. Scaling the target inside the recipe has unwanted consequences. So I recommend not doing so as a recipe step. |
@mdancho84 I don't believe the target variable |
In this case, I am only scaling the predictors. Additionally, when generating predictions using predict(), the results are identical for both recipes (with and without step_scale). Therefore, the root of the issue must lie within modeltime_calibrate function. |
Can you verify that pce is not being scaled?
|
@mdancho84 I had checked this before commenting:
|
Problem Description:
It appears that including step_scale() in the recipe disrupts prediction generation within modeltime. I encountered this issue when evaluating models using modeltime_accuracy() - where model fit was significantly worse with step_scale() - and also in modeltime_calibrate(), where forecasts displayed a clear systematic error. As a result, the discrepancy between forecasts from recipes with and without step_scale() is visually evident in the plotted forecasts.
Sample code:
Created on 2024-11-14 with reprex v2.1.1
Expected Behavior:
Forecasts with step_scale() should ideally align with those without scaling when properly calibrated.
Observed Behavior:
Forecasts generated with step_scale() in the recipe display systematic errors and notably different results compared to those without scaling, as evident from accuracy metrics and forecast plots.
Additional Context:
It would be helpful to understand whether step_scale() is introducing unexpected data transformations that interfere with forecast accuracy in modeltime, or if additional steps are needed to ensure compatibility.
The text was updated successfully, but these errors were encountered: