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
Plot the curve for learning of an lgbm forecaster #224
Comments
Hi @DariusMargineanNicolae |
Hello @JoaquinAmatRodrigo . Thanks for your reply. Basically yes, I want to view the predictions on the training data set also and then plot them along with the actual data to see how the model behave during training. |
The following steps should work:
Two observations:
You can find an example here: https://joaquinamatrodrigo.github.io/skforecast/0.4.3/notebooks/backtesting.html#predict-using-backtesting_forecaster |
It worked. Thanks a lot for your time! I will close the issue now.
|
Hello! I am new to sk.forecast.ForecasterAutoReg. I tried to implement an LGBM model, and make the predictions on 4 steps ahead. I did manage to visualize the predictions, but I struggle how to plot the curve for the learning part to see how the model performs on the learning dataframe. Below is the code I have used.
`forecaster = ForecasterAutoreg(
regressor=LGBMRegressor(**lgbm_trial_params), lags=[1,2,3,4]
)
cols = [col for col in df.columns if col not in ['date', "Qty"]]
exog = df[cols]
forecaster.fit(y=df["Qty"][:-4], exog=exog[:-4])
predictions = forecaster.predict(steps = 4,exog = exog[:-4])`
Qty represents the target variable I want to predict and my dataframe is structured on weekly data with month, week_num and last_month_average as features.
Here is a printscreen of the structure of my dataframe:
I did not manage to find something useful searching the internet so any help will be much apreciatted. Thanks!
The text was updated successfully, but these errors were encountered: