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

Mlforecast + AutoDifferences + fitted=True #319

Open
GGA-PERSO opened this issue Feb 21, 2024 · 2 comments
Open

Mlforecast + AutoDifferences + fitted=True #319

GGA-PERSO opened this issue Feb 21, 2024 · 2 comments
Labels

Comments

@GGA-PERSO
Copy link

GGA-PERSO commented Feb 21, 2024

What happened + What you expected to happen

Test of the new target transformation available in 0.11.8
AutoDifferences, AutoSeasonalDifferences, AutoSeasonalityAndDifferences

I am experimenting issue while fitting the model when fitted=True (in order to get insample forecast)

image

Versions / Dependencies

version 0.11.8

Reproduction script

import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from datasetsforecast.m4 import M4
from sklearn.base import BaseEstimator

from mlforecast import MLForecast
from mlforecast.target_transforms import Differences, LocalStandardScaler, AutoDifferences, AutoSeasonalDifferences, AutoSeasonalityAndDifferences

data_path = 'data'
await M4.async_download(data_path, group='Hourly')
df, *_ = M4.load(data_path, 'Hourly')
df['ds'] = df['ds'].astype('int32')
serie = df[df['unique_id'].eq('H196')]

mlfcst = MLForecast(
models=[],
freq=1,
target_transforms=[AutoDifferences(max_diffs=1)],
)
without_trend_and_seasonality = mlfcst.preprocess(serie)

mlfcst.fit(without_trend_and_seasonality.dropna(), id_col='unique_id', time_col='ds', target_col='y', fitted=True, dropna=True)

Issue Severity

Low: It annoys or frustrates me.

@GGA-PERSO GGA-PERSO added the bug label Feb 21, 2024
@helderPereira22
Copy link

I have the same issue, it would be amazing if you solve this!

@ThomasDataScienc
Copy link

ThomasDataScienc commented Mar 15, 2024

Hello, it would be very nice if you could add this. For the moment we can’t use autodifference, which represent a very interesting feature. Thank you in advance.

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

No branches or pull requests

3 participants