SGB के साथ रिग्रेशन
पिछले पाठ के अभ्यासों की तरह, आप Bike Sharing Demand डेटासेट पर काम करेंगे. अगले अभ्यास-समूह में, आप इस बाइक काउंट रिग्रेशन समस्या को स्टोकेस्टिक ग्रेडिएंट बूस्टिंग का उपयोग करके हल करेंगे.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में Tree-Based Models के साथ Machine Learning
अभ्यास निर्देश
Stochastic Gradient Boosting Regressor (SGBR) को इंस्टैंशिएट करें और सेट करें:
max_depthको 4 औरn_estimatorsको 200,subsampleको 0.9, औरmax_featuresको 0.75.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Import GradientBoostingRegressor
from sklearn.ensemble import GradientBoostingRegressor
# Instantiate sgbr
sgbr = ____(max_depth=____,
subsample=____,
max_features=____,
n_estimators=____,
random_state=2)