MulaiMulai sekarang secara gratis

Regression with SGB

As in the exercises from the previous lesson, you'll be working with the Bike Sharing Demand dataset. In the following set of exercises, you'll solve this bike count regression problem using stochastic gradient boosting.

Latihan ini adalah bagian dari kursus

Machine Learning with Tree-Based Models in Python

Lihat Kursus

Petunjuk latihan

  • Instantiate a Stochastic Gradient Boosting Regressor (SGBR) and set:

    • max_depth to 4 and n_estimators to 200,

    • subsample to 0.9, and

    • max_features to 0.75.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Import GradientBoostingRegressor
from sklearn.ensemble import GradientBoostingRegressor

# Instantiate sgbr
sgbr = ____(max_depth=____, 
            subsample=____,
            max_features=____,
            n_estimators=____,
            random_state=2)
Edit dan Jalankan Kode