Get startedGet started for free

Defining the forecasting pipeline

Now you'll define the forecasting model and parameters for the MLForecast pipeline. This step prepares the model configuration that will be used for time series forecasting in the pipeline.

This exercise is part of the course

Designing Forecasting Pipelines for Production

View Course

Exercise instructions

  • Import LGBMRegressor from lightgbm.
  • Instantiate a LGBMRegressor model with 100 estimators and a learning rate of 0.05.
  • Create a dictionary named params that includes the frequency ("h"), lags (1-24), and date features ("month", "day", "dayofweek", "week", and "hour").

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Import LGBMRegressor from lightgbm
from lightgbm import LGBMRegressor

# Instantiate the model
model = ____(____=____, ____=____)

# Set the model parameters
params = {
  "freq": ____,
  "lags": list(range(____, ____)),
  "date_features": ["month", ____, ____, ____, "hour"]
}
Edit and Run Code