๋จธ์ ๋ฌ๋ ๋ชจ๋ธ์ ๋น๊ต
- Power, expressibility: ์ผ๋ง๋ ๋ณต์กํ ์์ ์ ํ ์ ์๋๋
- Interpretability
- Ease of Use
- Training speed
- Prediction speed
Linear Regression | Nearest Neighbor | Deep Learning | |
Power/Expressibility | L | L | H |
Interpretability | H | H | L |
Ease of Use | H | H | L |
Training speed | H | H | L |
Prediction speed | H | L | H |
cf) ๋ฅ๋ฌ๋์ Foward Fast๋ฅผ ์ด์ฉํ๋ค. Nearest Neighbor๋ ๊ฑฐ๋ฆฌ ๊ณ์ฐ ๋๋ฌธ์ ์ฐ์ฐ ์๊ฐ์ด ๊ธธ๋ค.
XOR & Linear Classifier
- Linear Classifier๋ XOR ๊ฐ์ ๊ฐ๋จํ ๋น์ ํํจ์๋ฅผ ์ ํฉ์ํฌ ์ ์๋ค.
- ๋์: Decision tree, Random forest, Support Vector Machines, Deep Learning
Decision Tree Classifier
- root->leaf path๋ฅผ ํต๊ณผํ๋ฉด์ ๋ถ๋ฅ๊ฐ ๋๋ ๋ชจ๋ธ
- ํธ๋ฆฌ๋ ํ์ต ์์๋ค์ ๋น๊ต์ ๊ท ์ผํ ๊ตฌ์ฑ์ผ๋ก ๋ถํด
- Top-down manner๋ก ๊ตฌ์ฑ
- m๊ฐ์ ํด๋์ค๋ค์ ๋ํ ์ ๋ณด๋ฅผ ์ ์ ํ๊ธฐ ์ํด 1๊ฐ์ ํผ์ณ/์ฐจ์์ ๋ฐ๋ผ ๋ถ๋ฆฌ
* pure split: 1๊ฐ์ ๋จ์ผ ํด๋์ค ๋ ธ๋ ์์ฑ
* balanced split: group ํฌ๊ธฐ๊ฐ ๋๋ต์ ์ผ๋ก ๋น์ทํ๋๋ก ํญ๋ชฉ์ ๋ถ๋ฆฌ
Information-Theoretic Entropy
- entropy: class confusion์ ์์ ์ธก์
Split Criteria
- information gain
gain(D, A_i) = entropy(D)-entropy_{A_i}(D)
- ์ด์ฉ: ๋ฐ์ดํฐ ์นผ๋ผ๋ณ๋ก ๊ณ์ฐํด์, ๊ฐ์ฅ ๊ฐ์ด ํฐ ๊ฒ์ ์ ํํด์ผ ์ ๋๋ ์ ์์.
Stopping Criteria
- information gain์ด 0์ด ๋ ๋๊ฐ ์๋๋ผ, ์ ์ค๋ก ๋ณด๋ค ์๋ค๋ฉด ๋ฉ์ถฐ๋ ๋๋ค. -> ์ด์ ๋๋ฉด ์ถฉ๋ถํ๋ค๋ ๋ป
- alternate strategy: full tree๋ฅผ ๋ง๋ค์ด์ low value node๋ฅผ ๊ฐ์ง์น๊ธฐ ํ๊ธฐ
-> subtree์ค ์๋ฏธ๊ฐ ๊ฑฐ์ ์๋ ๋ถ๋ถ์ leaf๋ก ํต์ผํ ํ, ์๋ ํธ๋ฆฌ์ ์ฑ๋ฅ์ ๋น๊ตํ์ฌ ์ฑํ
Decision Tree์ ์ฅ์
- ๋น์ ํ์ฑ
- categorical variable์ ์ ์ ์ฉ
- ์ค๋ช ๊ฐ๋ฅ์ฑ ๋์
- robustness: ๋ค๋ฅธ ํธ๋ฆฌ๋ค๊ณผ์ ์์๋ธ์ ์งํํด์ ๋ ๋์ ๊ฒ์ voteํ ์ ์์
Ensemble Methods
1. Bagging
training
- k๊ฐ์ bootstrap sample ์์ฑ
- ๊ฐ๊ฐ์ S[i] ์ํ์ ๋ํด classifier๋ฅผ ์์ฑํด์ k๊ฐ์ classifier๋ฅผ ๋ง๋ฆ (๊ฐ์ ์๊ณ ๋ฆฌ์ฆ ์ด์ฉ)
testing
- k๊ฐ์ classifier๋ฅผ ๋์ผํ ๊ฐ์ค์น๋ก ํฌํํด์ ์๋ก์ด ์ฌ๋ก๋ค์ ๋ถ๋ฅํด๋ณด๊ธฐ
2. Boosting
training
- classifier์ sequence๋ฅผ ์์ฑ (๊ฐ์ base learner ์ด์ฉ)
- ๊ฐ๊ฐ์ classifier๋ ์ด์ classifier์ ์์กด์ ์ด๋ฉฐ ๊ทธ๊ฒ์ ์๋ฌ๋ฅผ ์ฐพ๋ ๋ฐ ์ง์ค
- ์ด์ classifier์์ ์๋ชป ์์ธก๋ ์ฌ๋ก๋ค์ ๋ ๋์ ๊ฐ์ค์น๋ฅผ ๋ถ์ฌ
testing
- classifier๋ค์ ์ฐ์์ผ๋ก ํ๋จ๋ ๊ฒฐ๊ณผ๋ฅผ ๊ฒฐํฉํ์ฌ test case์ ์ต์ข ํด๋์ค๋ฅผ ๋ถ์ฌ
Random Forest
- Bagging with decision tree + split attribute selection on random subspace
-> learning process์์ ๋๋ ํ๋ณด์๋ค ๊ฐ๊ฐ์ ์ ํํ์ฌ ํ์ตํ ๋ณํ ํธ๋ฆฌ ์๊ณ ๋ฆฌ์ฆ ์ฌ์ฉ -> random subset of features
* 1๋จ๊ณ: bootstrapped dataset ์์ฑ
* 2๋จ๊ณ: decision tree ์์ฑ -> ๊ฐ ๋จ๊ณ์ ํผ์ณ์ random subset๋ง์ ์ด์ฉํ bootstrapped dataset์ ์ด์ฉํด์ผ ํจ
- ์๋ก์ด ๋ ธ๋์์๋ root์ฒ๋ผ ๋๋ค์ผ๋ก ๋๊ฐ์ ๋ณ์๋ฅผ candidate๋ก ์ ํ (์ ์ฒด 3๊ฐ์ column์ค 1๊ฐ๋ ๋ฌด์)
* 3๋จ๊ณ: ๋ฐ๋ณต - ๋ฐ๋ณต์ ํตํด ์๋ก์ด ํธ๋ฆฌ๋ฅผ ๊ณ์ ์์ฑ
* 4๋จ๊ณ: Inference
- ๊ฐ์ฅ ํฌํ๋ฅผ ๋ง์ด ๋ฐ์ ์ต์ ์ด ๋ฌด์์ธ์ง ํ์ธ
* ์ ํ๋ ์ธก์
- ํต์์ ์ผ๋ก ์๋ณธ ๋ฐ์ดํฐ์ 1/3์ bootstrapped dataset์ ๋ํ๋์ง ์์
-> ์ด ๋ฐ์ดํฐ(Out-Of-Bag sample)๋ก validation์ ์งํ
Support Vector Machines
- ๋น์ ํ์ฑ ๋ถ๋ฅ๊ธฐ๋ฅผ ๋ง๋๋ ์ค์ํ ๋ฐฉ๋ฒ
- 2๊ฐ์ ํด๋์ค ์ฌ์ด์์ maximum margin linear separator๋ฅผ ์ถ๊ตฌ
SVM vs Logistic Regression
- ๊ณตํต์ : seperating plane
- ์ฐจ์ด์ : LR๋ ๋ชจ๋ ๊ฐ์ ๋ํด์ ํ๊ฐํ์ง๋ง, SVM์ ๊ฒฝ๊ณ์ ์๋ ์ ๋ง ํ์ธํจ
- SVM: ๊ธฐ๋ณธ์ ์ผ๋ก ์ ํ์ ์ด์ง๋ง ๋ ๊ณ ์ฐจ์์๋ ์ ์ฉํ ์ ์๋ค.
๊ณ ์ฐจ์์ผ๋ก์ projection
- ์ฐจ์ ์๋ฅผ ๋๋ฆฌ๋ฉด ๋ชจ๋ ๊ฒ์ linearly separableํ๊ฒ ๋ง๋ค ์ ์๋ค.
Kernels and non-linear functions
Feature Engineering
- domain-dependent data cleaning์ ์ค์ํ๋ค
* Z-scores, normalization
* bell-shaped distribution ์์ฑ
* missing value๋ฅผ imputing
* ์ฐจ์์ถ์ (SVD) -> ๋ ธ์ด์ฆ ๋ง๊ณ ์ค์ํ, y๊ฐ์ ์์ธกํ ์ ์๋ ์์ฃผ ์์ ์ ํธ ์ ๋ณด๋ค์ ๋ญ๊ฐ๋ฒ๋ฆด ์ ์์ด performance์ ๋ฌธ์ ๊ฐ ์๊ธธ ์ ์๋ค.
* non-linear combination์ explicit incorporation (ex. products, ratios...)
Nerual Networks