建立參考集與分析集
在把資料分成訓練、測試與上線(production)資料集之後,你就可以建立並部署模型。之後會使用測試與上線資料來建立參考集與分析集。
在這個練習中,你會走過這個流程。先前練習已經建立好的 X_train/test/prod 與 y_train/test/prod 資料集都已載入。
本題已匯入 pandas 並命名為 pd,可直接使用。
本練習屬於課程
在 Python 中監控 Machine Learning
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
from lightgbm import LGBMRegressor
# Fit the model
model = LGBMRegressor(random_state=111, n_estimators=50, n_jobs=1)
model.____(____, ____)
# Make predictions
y_pred_train = model.predict(____)
y_pred_test = model.predict(____)
# Deploy the model
y_pred_prod = model.predict(____)