9 Wed
ํ์
์ค๋ฌด์์๊ฒ ๋ฐฐ์ฐ๋ Kaggle ๋จธ์ ๋ฌ๋ ์
๋ฌธ
XGBoost ์๊ฐ
eTreme Gradient Boosting
Gradient Boosting ์๊ณ ๋ฆฌ์ฆ์ ์ถ๊ฐ์ ์ธ ํ ํฌ๋๋ค์ ๊ฒฐํฉํ ์๊ณ ๋ฆฌ์ฆ
๊ธฐ๋ณธ ์๋ฆฌ๋ Gradient Boosting ๊ธฐ๋ฐ
์บ๊ธ์ ์์๊ถ ์ฌ๋๋ค์ด ๋ง์ด ์ฌ์ฉํจ
๋ณ๋ ฌ์ ์ด๊ณ ํจ์จ์ ์ด๊ณ ์ต์ ํ๋์ด์์
์์๋ธ ๋ฌ๋
์์๋ธ ๋ฌ๋์ ํฌ๊ฒ Bagging ๋ฐฉ์๊ณผ Boosting ๋ฐฉ์์ผ๋ก ๋๋ ์ ์๋ค.
Bagging
๋งค๋ฒ ๋๋คํ๊ฒ ์ํ์ ๋ฝ์์ ๋ ๋ฆฝ์ ์ผ๋ก ํ์ต์ํจ ๋ถ๋ฅ๊ธฐ๋ค์ ๊ฒฐ๊ณผ๋ฅผ ์ข ํฉํ๋ ๊ฒ
๋ํ์ ์ธ ๋ฐฉ์์ผ๋ก๋ ๋๋ค ํฌ๋ ์คํธ๊ฐ ์๋ค
Boosting
๋งค๋ฒ ์ํ์ ๋ฝ์์ ํ์ต์ํค๋, ๋ ๋ฆฝ์ ์ด์ง ์๊ณ ์์ฐจ์ ์ผ๋ก ํ์ต ์ํจ๋ค
์ด์ ๋จ๊ณ์์ ์ค์ฐจ๊ฐ ํฐ ์ํ๋ค์ด ๋ค์ ๋ฝํ๋๋ก ํ๋ค
์ค์ฐจ๊ฐ ํฐ ์ํ๋ค์ ๊ฐ์ค์น๋ฅผ ๋ถ์ฌํด์ ๋ฝํ ํ๋ฅ ์ด ๋๋๋ก ํ๋ค
๋ํ์ ์ธ ๋ฐฉ์์ผ๋ก๋ AdaBoost, XGBoost, GradientBoost ๋ฑ์ด ์๋ค.
GBM
Gradient Boosting Machine
ํ์ต๊ณผ์ ์์ ํ๋ผ๋ฏธํฐ๋ฅผ ์ต์ ํํ๋๋ฐ GD ์๊ณ ๋ฆฌ์ฆ์ ์ฌ์ฉํ๋ค.
XGBoost์ ์ฅ์ ๊ณผ ๋จ์
์ฅ์
๋๋ถ๋ถ์ ์ํฉ์์ ์์ ์ ์ด๊ณ ์ข์ ์ฑ๋ฅ
Feature Enginerring์ ๋ง์ด ์ ์ฉํ์ง ์์๋ ์์ ์ ์ธ ์ฑ๋ฅ
๋จ์
ํ์ดํผ ํ๋ผ๋ฏธํฐ๊ฐ ๋ฐฉ๋ํด์ ํ๋ํ๋ ๊ฒ์ด ์๋์ ์ผ๋ก ์ด๋ ต๋ค
Stroke Preidction ๋ฐ์ดํฐ์
์๊ฐ
๋์ด, ์ฑ๋ฒผ๋ฅด ๊ณ ํ์ ์ ๋ฌด ๋ฑ์ ํ ๋๋ก ๋์กธ์ค์ ๊ฐ์ง ์ฌ๋์ธ์ง ์๋์ง ์์ธกํด๋ณด๋ ๋ฐ์ดํฐ์
Feature : 12 Dimentsion
id
gender
age
hypertension : ๊ณ ํ์ ์ ๋ฌด
hear_disease : ์ฌ์ฅ๋ณ ์ ๋ฌด
ever_married
work_type
Residence_type
avg_glucose_level
bim : body mass index
smoking status
stroke
Target Value : Binary Classification
stroke : ๋์กธ์ฆ
not stroke
๋ฐ์ดํฐ ๊ฐ์ : 5,110
XGBoost๋ฅผ ์ด์ฉํด์ ๋์กธ์ค(Stroke) ๋ฐ์์ ๋ฌด ์์ธกํด๋ณด๊ธฐ - Stroke Prediction ๋ฐ์ดํฐ์
Input data : 11 Dimension
Target : stroke
Yes : 1
No : 0
Estimator
DecisionTreeClassifier
RandomforestClassifier
XGBoostClassifier
์ถ๊ฐ์ ์ธ ์ ์ฉ๊ธฐ๋ฒ
Data Cleansing : ๊ฒฐ์ธก์น ์ฒ๋ฆฌ
๋ถํ์ํ Feature ์ ๊ฑฐ
์๊ด๊ด๊ณ
๊ทธ๋๋ง ๋์ด๊ฐ stroke์ ์ ์ผ ์ฐ๊ด์ด ์๋ค
String(object) ๋ ์ด๋ธ encodingํ๊ธฐ
Last updated
Was this helpful?