[資料分析&機器學習] 第3.5講 : 決策樹(Decision Tree)以及隨機森林(Random Forest)介紹

[資料分析&機器學習] 第3.5講 : 決策樹(Decision Tree)以及隨機森林(Random Forest)介紹

???????????????Perceptron, Logistic Regression, SVM??????????????????Logistic Regression?? SVM??????????A???B?????????SVM????????????????????????????????????(Model)????????????????????????X???X?????????????????????????????????????????????????????????????????????????

???????? -100 + 6*?? + 3*?? = 0

-100 + 6*?? + 3*?? > 0 ??????????

-100 + 6*?? + 3*?? < 0 ??????????

???????????????????????????????????????????????????????????????????????????????????????????????????????????

????????????????????????????

-100 + 6*?? + 3*?? + 20*??*?? + -70*??*??*?? +?..

???????????????

????????????????????????????????????????120?125???????5%-7%??????????????????????????????????????????????????????????????????????????????????????????????????????(Interpretability)??????????????????????????

?????????????

????????????????????????>125 ?????<5%????????????????????????????????????(??????????????)????????????????????????(Information gain, ??IG)?

?????????????????????????????????

???????????(Entropy) ?? Gini???(Gini Impurity)

??????
Gini Impurity?????

?????????????????????????80?????40?1???40??2????????????????????????????????40??????????30?1?????10?2?????????10?1?????30?2????????????????????60/20??????????20?1?????40?2?????????????20?1??????

?

Gini ???

????????????Gini????????????????(B)

??????????????????Iris????

??????????????Iris???

????70%???train????30?????train???

????????criterion?????????entropy??????gini impurity?max_depth???????????????????????overfit????????????max_depth???????

?????????????????????????????score????????

???????????

????????export_graphviz?????????????

??????????????????2.45????????

????????????????????????????????????????????????????????

????(Random Forest)

????????????????????????????????????????????????????????????????????????????????????????????????????????????????Ensemble????????????????????????????????????????????????????????????????????????????????(Ensemble learning)????????????????????????????????????????????(Overfit)????????????????????????????????????????????????????

????????????????????????????????????n_estimators?????(????????????)??????????????????n_jobs???????????????????????????????????????????????????

??

????????????Graphviz????Graphviz?????????Mac ????Mac??????HomeBrew??????????????????? brew install graphviz

Grapviz

https://www2.graphviz.org/

Mac??????

https://brew.sh/index_zh-tw.html

???

??????????????????????????????????????????50????

[Python?????????]????????Hahow?????????????????????????????????????https://hahow.in/cr/pydataml

?????????????????????????????https://yehjames.typeform.com/to/XIIVQC????????????????????? [emailprotected]

????

  1. [?]Python ????
3

No Responses

Write a response