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

[FIX] #623 #628

Closed
wants to merge 1 commit into from
Closed

[FIX] #623 #628

wants to merge 1 commit into from

Conversation

akmalsoliev
Copy link
Contributor

@akmalsoliev akmalsoliev commented Aug 30, 2023

All indexes will be reset and unique_id will be structured to become a single index, the rest of the indexes will be treated as columns.

Issue link: #623

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jmoralez
Copy link
Member

Hey @akmalsoliev, do you have a reproducible example of #623?

@akmalsoliev
Copy link
Contributor Author

Hey @akmalsoliev, do you have a reproducible example of #623?

Give this a try:

import pandas as pd

Y_df = pd.read_parquet('https://datasets-nixtla.s3.amazonaws.com/m4-hourly.parquet')
Y_df = Y_df.set_index(["unique_id", "ds"])
from statsforecast import StatsForecast

StatsForecast.plot(Y_df)

from statsforecast.models import (
    HistoricAverage,
    SeasonalNaive,
)

# Create a list of models and instantiation parameters
models = [
    HistoricAverage(),
]

# Instantiate StatsForecast class as sf
sf = StatsForecast(
    df=Y_df, 
    models=models,
    freq='H', 
    n_jobs=-1,
    fallback_model = SeasonalNaive(season_length=7)
)

forecasts_df = sf.forecast(h=48, level=[90])

sf.plot(Y_df,forecasts_df)

@jmoralez
Copy link
Member

Wouldn't that fail the column validation?

@akmalsoliev akmalsoliev marked this pull request as draft September 1, 2023 09:06
@akmalsoliev
Copy link
Contributor Author

UPDATE: awaiting @mark-conway reply to fully understand the issue.

@akmalsoliev
Copy link
Contributor Author

Depreciated in favour of a new structure.

@akmalsoliev akmalsoliev closed this Oct 4, 2023
@akmalsoliev akmalsoliev deleted the multi_dim_fix branch October 13, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants