开始使用免费开始使用

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.

本练习是课程的一部分

Designing Forecasting Pipelines for Production

查看课程

练习说明

  • 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").

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Import LGBMRegressor from lightgbm
from ____ import ____

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

# Set the model parameters
params = {
  "freq": "____",
  "lags": list(range(____, ____)),
  "date_features": ["month", "day", "____", "____", "hour"]
}
编辑并运行代码