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

Time Series Multiple forecast - names #2368

Closed
ngupta23 opened this issue Apr 4, 2022 · 1 comment · Fixed by #2407
Closed

Time Series Multiple forecast - names #2368

ngupta23 opened this issue Apr 4, 2022 · 1 comment · Fixed by #2407
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers plot_model priority_medium time_series Topics related to the time series

Comments

@ngupta23
Copy link
Collaborator

ngupta23 commented Apr 4, 2022

Is your feature request related to a problem? Please describe.
With the March release of time series module, we have the ability to plot multiple forecasts in a single plot. This works ok if we have different models (such as from the output of compare_models). But sometimes, we want to compare different versions of the same model in which case, we get the same legend

from pycaret.datasets import get_data
from pycaret.time_series import TSForecastingExperiment

#### Load data and simulate missing values ----
data = get_data("airline")

#### Setup Forecasting Experiment ----
exp = TSForecastingExperiment()
exp.setup(data=data, fh=12, session_id=42)

model = exp.create_model("exp_smooth")
tuned = exp.tune_model(model)
final = exp.finalize_model(tuned)

exp.plot_model([model, tuned, final])

image

Describe the solution you'd like
Allow user to pass the model names through a generic argument called labels which can possibly be repurposed for various plot types as per the needs of the plots.

exp.plot_model([model, tuned, final], labels = ["baseline", "tuned", "finalized"])

Also add checks to make sure that if labels are passed, then they are the same length as the estimators

Describe alternatives you've considered
None available at this time

@ngupta23 ngupta23 added enhancement New feature or request good first issue Good for newcomers time_series Topics related to the time series plot_model labels Apr 4, 2022
@ngupta23 ngupta23 added this to the pycaret 3.0.0 milestone Apr 4, 2022
@ngupta23 ngupta23 added this to To do in Time Series Forecasting via automation Apr 4, 2022
@ngupta23
Copy link
Collaborator Author

ngupta23 commented Apr 9, 2022

Aligned in 2022/0409 meeting with @moezali1 and @Yard1

Use data_kwargs = {"labels": ["baseline", "tuned", "finalized"]} instead of adding an additional argument.

@ngupta23 ngupta23 self-assigned this Apr 13, 2022
ngupta23 added a commit that referenced this issue Apr 14, 2022
implemented changes for #2368 and added unit tests
@ngupta23 ngupta23 linked a pull request Apr 14, 2022 that will close this issue
13 tasks
Time Series Forecasting automation moved this from To do to Done Apr 14, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers plot_model priority_medium time_series Topics related to the time series
Development

Successfully merging a pull request may close this issue.

1 participant