Kaggle 대회

학습 내용

Data Fields

필드명 설명
datetime hourly date + timestamp
season 1 = spring, 2 = summer, 3 = fall, 4 = winter
(봄[1], 여름[2], 가을[3], 겨울[4])
holiday whether the day is considered a holiday
(휴일인지 아닌지)
workingday whether the day is neither a weekend nor holiday
(일하는 날인지 아닌지)
weather
1: Clear, Few clouds, Partly cloudy, Partly cloudy
2: Mist + Cloudy, Mist + Broken clouds, Mist + Few clouds, Mist
3: Light Snow, Light Rain + Thunderstorm + Scattered clouds, Light Rain + Scattered clouds
4: Heavy Rain + Ice Pallets + Thunderstorm + Mist, Snow + Fog
temp temperature in Celsius (온도)
atemp "feels like" temperature in Celsius (체감온도)
humidity relative humidity (습도)
windspeed wind speed (바람속도)
casual number of non-registered user rentals initiated (비가입자 사용유저)
registered number of registered user rentals initiated (가입자 사용유저)
count number of total rentals (시간대 별 자전거 빌린 대수)

1-1 데이터 준비하기

1-3 파생변수(더미변수) 생성

변수 시각화

변수 선택 및 데이터 나누기

1-4 모델 만들기 및 제출

의사 결정 트리 모델 만들기

그렇다면 어떤 모델이 나은지 어떻게 판단할 수 있는가?

1-5 모델 평가 및 제출

선형회귀

의사결정트리 decision tree, knn

앙상블 RandomForest, Ada

머신러닝 대표적 앙상블 중의 하나 XGBOOSTING 기법 사용해보기

사이킷런 기반 파라미터 설명

파라미터명 설명 사이킷런 기본값(파이썬기반)
learning_rate(or eta) 0~1사이의 값. 과적합을 방지하기 위한 학습률 값 기본값 : 0.1(0.3)
n_estimators(or num_boost_rounds) 트리의 수 기본값 100(10)
max_depth 각각의 나무 모델의 최대 깊이 기본값 3(6)
subsample 각 나무마다 사용하는 데이터 샘플 비율
낮은 값은 underfitting(과소적합)을 야기할 수 있음.
기본값 : 1
colsample_bytree 각 나무마다 사용하는 feature 비율.
High value can lead to overfitting.
기본값 : 1
reg_alpha(or alpha) L1 규제에 대한 항
피처가 많을 수록 적용을 검토한다.
기본값 : 0
reg_lambda(or lambda) L2 규제의 적용 값. 피처의 개수가 많을 경우 적용 검토 기본값 : 1
scale_pos_weight 불균형 데이터셋의 균형 유지 기본값 : 1

학습 태스크 파라미터

파라미터명 설명 사이킷런 기본값(파이썬기반)
objective(목적함수) reg:linear for regression problems(회귀 문제),
reg:logistic for classification problems with only decision(분류 문제),
binary:logistic for classification problems with probability.(이진 분류)

학습

REF

History