Andreas Kaae
03/26/2024, 11:47 AM.update()
not working:
Hello I have the following example:
from datasetsforecast.m4 import M4
import random
await M4.async_download('data', group='Hourly')
df, *_ = M4.load('data', 'Hourly')
uids = df['unique_id'].unique()
random.seed(0)
sample_uids = random.choices(uids, k=2)
df = df[df['unique_id'].isin(sample_uids)].reset_index(drop=True)
df['ds'] = df['ds'].astype('int64')
fcst = MLForecast(
models=LGBMRegressor(),
freq=1,
)
df_train_M4 = df[df["ds"] <= 1000]
fcst.fit(df_train_M4)
fcst.predict(4)
When I then hereafter try to use the update functionality I get `AttributeError: 'MLForecast' object has no attribute 'update'`:
new_values = df[df["ds"] > 1000]
fcst.update(new_values)
Can anyone see what I'm doing wrong? I am using: mlforecast.__version__ = '0.12.0'
José Morales
03/26/2024, 3:37 PMfcst.ts.update(new_values)
insteadAndreas Kaae
03/27/2024, 7:39 AM