Slackbot
03/04/2025, 2:17 PMsl
03/04/2025, 4:55 PMlags
or lag_transforms
when doing predict?Chris Naus
03/06/2025, 4:51 PMBersu T
03/07/2025, 10:51 AMBersu T
03/07/2025, 3:54 PMGabriel Luis Cajeux
03/09/2025, 8:53 PMBersu T
03/10/2025, 11:06 AMauto_mlf = AutoMLForecast(
freq="ME",
season_length=12,
models={
'lgb': AutoLightGBM()
},
fit_config=lambda trial: {'static_features': ['unique_id']}
)
auto_mlf.fit(
df=df_encoded,
n_windows=n_windows,
h=h,
step_size=step_size,
fitted=True,
num_samples=40,
loss=loss_fn
)
config = auto_mlf.results_['lgb'].best_trial.user_attrs['config']
fcst = MLForecast(
models=[LGBMRegressor(**config['model_params'])],
freq="ME",
**config['mlf_init_params']
)
cv_result2 = fcst.cross_validation(
df_encoded,
n_windows=n_windows, # number of windows
h=h,
step_size=step_size,
static_features= ['unique_id']
) prep = fcst.preprocess(df_encoded, static_features=['unique_id'])
X = prep.drop(columns=['unique_id', 'ds', 'y'])
fcst.fit(df_encoded, static_features=['unique_id']) explainer = shap.Explainer(fcst.models_["LGBMRegressor"].predict, X)
shap_values = explainer(X)
Bersu T
03/11/2025, 7:12 AMBersu T
03/14/2025, 11:26 AMconfig_lgb = auto_mlf.results_['my_lgb'].best_trial.user_attrs['config']
config_lgb['mlf_init_params']['date_features'] = ['month']
What is the recommended way to update the best trial configuration to make some minor modifications?Vitor Cerqueira
03/14/2025, 12:50 PMMikhael Chris
03/17/2025, 10:40 AMBersu T
03/17/2025, 11:40 AMMikhael Chris
03/21/2025, 4:39 AMIHAS
03/22/2025, 10:26 PMBrian Head
03/25/2025, 9:39 PMmlf.preprocess
and looking at my transformations, I'm seeing a few things I'm wondering about. They are:
• How do I have values for lags that don't exist? For example, a lag of 1 in the same line as the first value not being null.
• Same with expanding means and seasonal means.
• Maybe this is causing the issue I'm seeing with expanding mean or maybe not. I thought an expanding mean was the mean for all values up to a position of interest. So, in row 3 of a series it'd be the mean of rows 1-3. No? I'm seeing different for the expanding mean that I calculate using the above understanding.
Appreciate any help.
Thanksjan rathfelder
03/26/2025, 6:58 AMBersu T
03/26/2025, 9:39 AMMikhael Chris
03/27/2025, 2:40 AMSantosh Puvvada
03/28/2025, 6:30 AMBarrett Layman
03/28/2025, 11:33 AMsl
03/28/2025, 4:13 PMIHAS
04/01/2025, 8:10 PMsl
04/07/2025, 8:19 PMsl
04/09/2025, 8:16 PMMLForecast.from_cv()
I got zig zaggy predictions (screenshot2). I'm not sure this indicates anything but I can't find a way to explain these discrepancy as all the boosters in lgbmcv gave me the same "shape".Chris Naus
04/10/2025, 1:24 PMJonghyun Yun
04/11/2025, 11:37 AMBersu T
04/23/2025, 7:55 AMBersu T
04/23/2025, 8:10 PMTiago Augusto Ferreira
04/24/2025, 7:23 PMEx. {
unique_id : 1,
ds: 50,
feature_a : 1
},
{
unique_id : 1,
ds: 50,
feature_a : 2
}
Sarim Zafar
04/27/2025, 11:13 AMmlforecast
and exploring ways to automate feature engineering.
For feature creation, I think I see paths forward (e.g., adding/excluding custom feature groups as part of optuna trial). However, I'm looking for guidance on automated feature selection within the mlforecast
pipeline itself.
I considered using the Optuna
integration, but that seems more geared towards overall hyperparameter tuning rather than specifically iterating on feature sets before the main model tuning/training.
Is there a recommended way to achieve automated feature selection with mlforecast
currently? Or, perhaps, could a small module dedicated to feature selection (e.g., based on importance, stepwise methods) be a potential future addition? That would be incredibly helpful!
Any advice or pointers would be greatly appreciated! Thanks! 🙏