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

StatsForecast.plot can't be work in a for statement #712

Closed
cycy1013 opened this issue Aug 29, 2023 · 3 comments
Closed

StatsForecast.plot can't be work in a for statement #712

cycy1013 opened this issue Aug 29, 2023 · 3 comments

Comments

@cycy1013
Copy link

cycy1013 commented Aug 29, 2023

in my jupyter notebook:

for cutoff in cv_df['cutoff'].unique():
    StatsForecast.plot(
        Y_df, 
        cv_df.query('cutoff == @cutoff').drop(columns=['y', 'cutoff']), 
        max_insample_length=48 * 4, 
        unique_ids=['H105'],
        engine='matplotlib'
    )

can't show the figure
but when i remove for ,and write 'cutoff == 191' like this,it can show a figure

@jmoralez jmoralez transferred this issue from Nixtla/neuralforecast Nov 28, 2023
@CuiZhengliang
Copy link

I have the same problem, have u found any solution?

@jmoralez
Copy link
Member

Hey. You can manually display the plots like this:

from IPython.display import display

for cutoff in cv_df['cutoff'].unique():
    fig = StatsForecast.plot(
        Y_df, 
        cv_df.query('cutoff == @cutoff').drop(columns=['y', 'cutoff']), 
        max_insample_length=48 * 4, 
        unique_ids=['H105'],
        engine='matplotlib'
    )
    display(fig)

Copy link
Contributor

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants