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
LGBMRegressorfromlightgbm. - Instantiate a
LGBMRegressormodel with100estimators and a learning rate of0.05. - Create a dictionary named
paramsthat 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"]
}