Skip to content
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

[BUG] plot_model() is not working consistently when fh has gaps #1865

Closed
tugra-alp opened this issue Nov 18, 2021 · 5 comments
Closed

[BUG] plot_model() is not working consistently when fh has gaps #1865

tugra-alp opened this issue Nov 18, 2021 · 5 comments
Assignees
Labels
bug Something isn't working time_series Topics related to the time series

Comments

@tugra-alp
Copy link

tugra-alp commented Nov 18, 2021

I used compare_model() to select top 3 models, and combine them with blend_model() function.

fh=np.arange(25,73) : 1 day gap and 2 days forecast horizon in each split (Hourly data).

custom_split = SlidingWindowSplitter(fh=np.arange(25,73) , window_length=1200, step_length=720)
exp = TimeSeriesExperiment()
exp.setup(data=data1, fold_strategy = custom_split, preprocess = False, session_id = 42 )
.
.
.
exp.plot_model(blended_model, plot='forecast')

After created blended_model object to see model performance, used plot_model and got this error.

plotmodelissue

plotmodelerrorreport

Note: Even i create single model to see model performance, same error raise up.
Note: Sometimes this code snippet works fine, but when i re-run it, it comes with same error.

@tugra-alp tugra-alp added the bug Something isn't working label Nov 18, 2021
@ngupta23
Copy link
Collaborator

You seem to be passing a lot of custom things to the splitter. I can not tell the issue just by looking at the pictures. Can you share a minimally reproducible example (code + data) so I can debug? Thanks!

@ngupta23
Copy link
Collaborator

ngupta23 commented Nov 18, 2021

Can you try passing fh = np.arange(1, 73) and check if it works? I don't think intermittent fh is supported yet. Just a guess by looking at the image and the difference in the shapes in the error message. Once you confirm that it works by making fh continuous, I can see if a fix can be released shortly.

@ngupta23 ngupta23 self-assigned this Nov 18, 2021
@ngupta23 ngupta23 added the time_series Topics related to the time series label Nov 18, 2021
@ngupta23 ngupta23 added this to To do in Time Series Forecasting via automation Nov 18, 2021
@ngupta23 ngupta23 added this to the Time Series Gamma Release milestone Nov 18, 2021
@tugra-alp
Copy link
Author

When i try fh = np.arange(1, 73) , it worked ! However, as i mentioned above if i set fh with gap it doesn't work although it was working before.

@tugra-alp
Copy link
Author

tugra-alp commented Nov 18, 2021

As a Temporary solution,
This problem can solve if we set data_kwargs when plotting.
Ex:
fh=np.arange(25,73) : 1 day gap and 2 days forecast horizon in each split (Hourly data).

exp.plot_model(estimator=model, data_kwargs = {'fh' : 72})

@ngupta23
Copy link
Collaborator

Fixed, it will be available in the next release.

Time Series Forecasting automation moved this from To do to Done Nov 28, 2021
@ngupta23 ngupta23 changed the title [BUG] plot_model() is not working consistently [BUG] plot_model() is not working consistently when fh has gaps Nov 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working time_series Topics related to the time series
Development

No branches or pull requests

2 participants