Hi team. I have started experimenting with MLForec...
# mlforecast
m
Hi team. I have started experimenting with MLForecast recently and I was wondering if there is any way to do hyper-parameter tuning to the individual models passed to MLForecast? For example: If I am using multiple models like below
Copy code
lgb_params = {
    'verbosity': -1,
    'num_leaves': 512,
}

models = {
    'KNeighborsRegressor': KNeighborsRegressor(),
    'Lasso': Lasso(),
    'LinearRegression': LinearRegression(),
    'MLPRegressor': MLPRegressor(),
    'Ridge': Ridge(),
    'DT': DecisionTreeRegressor(),
    'avg': lgb.LGBMRegressor(**lgb_params),
    'q75': lgb.LGBMRegressor(**lgb_params, objective='quantile', alpha=0.75),
    'q25': lgb.LGBMRegressor(**lgb_params, objective='quantile', alpha=0.25)
}
Is there a way to hyper-parameter tune these individual models using MLForecast or any other offering by Nixtla? I do understand that there is the option of using traditional approaches like gridsearchcv etc but the process would become very complicated because I have multiple unique_ids for which I want to forecast. Thanks in advance!
j
Hey. We're currently working on adding a module with some utilities for hyperparameter optimization, in the meantime you'd have to do it manually, so one process for each model. Keep in mind that mlforecast uses a single global model, so it shouldn't matter how many ids you have
m
Hey @José Morales. Thank you for that. It's a little trickier than that because each unique_id represents a different entity's data and therefore traditional hyper-parameter tuning approaches can get complicated.
j
So you want to have one model for each unique_id?
m
Yes, as you said as mlforecast uses a single global model, it is easier with mlforecast but it is complicated with normal HP tuning approach