SGB로 회귀 수행하기
이전 레슨의 연습 문제와 마찬가지로 Bike Sharing Demand 데이터셋을 사용합니다. 다음 연습 문제 세트에서는 확률적 그래디언트 부스팅을 사용해 자전거 대여 수요 회귀 문제를 해결해 볼 거예요.
이 연습은 강의의 일부입니다
Python으로 배우는 트리 기반 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)