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

Support for business week #1854

Closed
ngupta23 opened this issue Nov 14, 2021 · 4 comments · Fixed by #2367
Closed

Support for business week #1854

ngupta23 opened this issue Nov 14, 2021 · 4 comments · Fixed by #2367
Assignees
Labels
enhancement New feature or request priority_medium setup time_series Topics related to the time series

Comments

@ngupta23
Copy link
Collaborator

Since many business activities happen only on weekdays, missing weekends can be an issue for time series models. Add support for data that is available only on weekdays.

Indirectly related: #1853

@ngupta23 ngupta23 added enhancement New feature or request time_series Topics related to the time series labels Nov 14, 2021
@ngupta23 ngupta23 added this to the Time Series Backlog milestone Nov 14, 2021
@ngupta23 ngupta23 added this to To do in Time Series Forecasting via automation Nov 14, 2021
@ngupta23 ngupta23 self-assigned this Nov 14, 2021
@ngupta23
Copy link
Collaborator Author

@ngupta23
Copy link
Collaborator Author

ngupta23 commented Mar 6, 2022

Double check (from Konrad's 3rd presentation)

Prophet supports irregularly spaced time series.
Exponential Smoothing and ARIMA do not.

@ngupta23
Copy link
Collaborator Author

ngupta23 commented Mar 26, 2022

This notebook shows a workaround for now (i.e. pass seasonal period manually): https://gist.github.com/ngupta23/420fef55fb6a6c92c6035432660f6552

But this (along with all other frequency types per this link) should be easy to handle.

@ngupta23
Copy link
Collaborator Author

ngupta23 commented Apr 3, 2022

To test,

import numpy as np
import pandas as pd
from pycaret.time_series import TSForecastingExperiment
import datetime


N = 106
data = pd.DataFrame(
    range(N) + np.random.randn(N),
    columns=["Value"],
    index=pd.date_range(start="2022-01-01", end="2022-05-30", freq="C").tolist(),
)
exp = TSForecastingExperiment()
exp.setup(data=data, fh=6, session_id=42)
exp.plot_model()
# best_model = exp.compare_models(turbo=True)
best_model = exp.create_model("ets")
exp.predict_model(best_model)
exp.plot_model(best_model)

N = 48
data = pd.DataFrame(
    range(N) + np.random.randn(N),
    columns=["Value"],
    index=pd.date_range(start="2022-01-01", end="2030-01-01", freq="2M").tolist(),
)
exp = TSForecastingExperiment()
exp.setup(data=data, fh=6, session_id=42)
exp.plot_model()
# best_model = exp.compare_models(turbo=True)
best_model = exp.create_model("ets")
exp.predict_model(best_model)
exp.plot_model(best_model)

ngupta23 added a commit that referenced this issue Apr 4, 2022
support for business week plus more seasonal periods per #1854
@ngupta23 ngupta23 closed this as completed Apr 4, 2022
Time Series Forecasting automation moved this from To do to Done Apr 4, 2022
@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
enhancement New feature or request priority_medium setup time_series Topics related to the time series
Development

Successfully merging a pull request may close this issue.

1 participant