You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.10/dist-packages/mlforecast/forecast.py in predict(self, h, before_predict_callback, after_predict_callback, new_df, level, X_df, ids)
706 if new_df is not None:
707 if level is not None:
--> 708 raise ValueError(
709 "Prediction intervals are not supported in transfer learning."
710 )
ValueError: Prediction intervals are not supported in transfer learning.
/usr/local/lib/python3.10/dist-packages/mlforecast/forecast.py in predict(self, h, before_predict_callback, after_predict_callback, new_df, level, X_df, ids)
706 if new_df is not None:
707 if level is not None:
--> 708 raise ValueError(
709 "Prediction intervals are not supported in transfer learning."
710 )
ValueError: Prediction intervals are not supported in transfer learning.
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered:
What happened + What you expected to happen
I am trying to predict target components over prediction intervals using Transfer Learning approach. But I am getting below error:
ValueError Traceback (most recent call last)
in <cell line: 2>()
1 levels = [20, 75,80, 95]
----> 2 forecasts = mlf.predict(7, level=levels, new_df=df3)
3 forecasts.head()
/usr/local/lib/python3.10/dist-packages/mlforecast/forecast.py in predict(self, h, before_predict_callback, after_predict_callback, new_df, level, X_df, ids)
706 if new_df is not None:
707 if level is not None:
--> 708 raise ValueError(
709 "Prediction intervals are not supported in transfer learning."
710 )
ValueError: Prediction intervals are not supported in transfer learning.
Versions / Dependencies
import mlforecast
print(mlforecast.version)
0.15.0
Reproduction script
Y_df_M3, _, _ = M3.load(directory='./', group='Monthly')
models = [lgb.LGBMRegressor(verbosity=-1)]
fcst = MLForecast(
models=models,
lags=range(1, 13),
freq='MS',
target_transforms=[Differences([1, 12])],
)
fcst.fit(Y_df_M3);
Y_df = pd.read_csv('https://datasets-nixtla.s3.amazonaws.com/air-passengers.csv', parse_dates=['ds'])
We define the train df.
Y_train_df = Y_df[Y_df.ds<='1959-12-31'] # 132 train
Y_test_df = Y_df[Y_df.ds>'1959-12-31'] # 12 test
levels = [50, 80, 95]
Y_hat_df = fcst.predict(h=12, level = levels, new_df=Y_train_df)
Y_hat_df.head()
ValueError Traceback (most recent call last)
in <cell line: 2>()
1 levels = [50, 80, 95]
----> 2 Y_hat_df = fcst.predict(h=12, level = levels, new_df=Y_train_df)
3 Y_hat_df.head()
/usr/local/lib/python3.10/dist-packages/mlforecast/forecast.py in predict(self, h, before_predict_callback, after_predict_callback, new_df, level, X_df, ids)
706 if new_df is not None:
707 if level is not None:
--> 708 raise ValueError(
709 "Prediction intervals are not supported in transfer learning."
710 )
ValueError: Prediction intervals are not supported in transfer learning.
Issue Severity
High: It blocks me from completing my task.
The text was updated successfully, but these errors were encountered: