Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Tree Methods
Search
Sunmi Yoon
November 04, 2019
Technology
0
100
Tree Methods
Decision Tree, Random Forest를 dataitgirls3 학생들에게 가르치기 위해 만든 수업자료입니다.
Sunmi Yoon
November 04, 2019
Tweet
Share
More Decks by Sunmi Yoon
See All by Sunmi Yoon
데이터 분석가 채용 공고 읽는 방법
ysunmi0427
1
320
Deep down in classification 0.5 magic number
ysunmi0427
0
84
Confusion matrix
ysunmi0427
0
140
심슨의 역설
ysunmi0427
0
2k
회사는 어떤 사람을 데이터 분석가로 채용하고 싶어하는 것일까?
ysunmi0427
0
2k
Other Decks in Technology
See All in Technology
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
3
360
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
430
LINEヤフーにおけるPrerender技術の導入とその効果
narirou
1
250
静的解析で実現した効率的なi18n対応の仕組みづくり
minako__ph
2
280
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
3
870
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
630
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
130
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
200
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
330
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
580
A Tour of Anti-patterns for Functional Programming
guvalif
0
110
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
3
640
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
243
12k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Site-Speed That Sticks
csswizardry
0
37
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
120
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
Tree methods dataitgirls3 Instructor Sunmi Yoon
Decision Tree
Sex <= 0.5 gini = 0.473 samples = 891 value
= [549, 342] class = Survived Fare <= 26.269 gini = 0.306 samples = 577 value = [468, 109] class = Survived True Fare <= 48.2 gini = 0.383 samples = 314 value = [81, 233] class = Dead False gini = 0.226 samples = 415 value = [361, 54] class = Survived gini = 0.448 samples = 162 value = [107, 55] class = Survived gini = 0.447 samples = 225 value = [76, 149] class = Dead gini = 0.106 samples = 89 value = [5, 84] class = Dead
Sex <= 0.5 gini = 0.473 samples = 891 value
= [549, 342] class = Survived Fare <= 26.269 gini = 0.306 samples = 577 value = [468, 109] class = Survived True Fare <= 48.2 gini = 0.383 samples = 314 value = [81, 233] class = Dead False gini = 0.226 samples = 415 value = [361, 54] class = Survived gini = 0.448 samples = 162 value = [107, 55] class = Survived gini = 0.447 samples = 225 value = [76, 149] class = Dead gini = 0.106 samples = 89 value = [5, 84] class = Dead Root Node (ࡸܻ) Intermediate Node (о) Terminal Node, Leaf ()
Sex <= 0.5 gini = 0.473 samples = 891 value
= [549, 342] class = Survived Fare <= 26.269 gini = 0.306 samples = 577 value = [468, 109] class = Survived True Fare <= 48.2 gini = 0.383 samples = 314 value = [81, 233] class = Dead False gini = 0.226 samples = 415 value = [361, 54] class = Survived gini = 0.448 samples = 162 value = [107, 55] class = Survived gini = 0.447 samples = 225 value = [76, 149] class = Dead gini = 0.106 samples = 89 value = [5, 84] class = Dead അ ਤী ؘఠо ݻ ѐ ਤ೧ ח Ӓ ؘఠٜ যڃ ۄ߰ਸ оҊ ח
Sex <= 0.5 gini = 0.473 samples = 891 value
= [549, 342] class = Survived Fare <= 26.269 gini = 0.306 samples = 577 value = [468, 109] class = Survived True Fare <= 48.2 gini = 0.383 samples = 314 value = [81, 233] class = Dead False gini = 0.226 samples = 415 value = [361, 54] class = Survived gini = 0.448 samples = 162 value = [107, 55] class = Survived gini = 0.447 samples = 225 value = [76, 149] class = Dead gini = 0.106 samples = 89 value = [5, 84] class = Dead যڃ ӝળਵ۽ оӝܳ ೮ח (gini ژח entropy)
Sex <= 0.5 gini = 0.473 samples = 891 value
= [549, 342] class = Survived Fare <= 26.269 gini = 0.306 samples = 577 value = [468, 109] class = Survived True Fare <= 48.2 gini = 0.383 samples = 314 value = [81, 233] class = Dead False gini = 0.226 samples = 415 value = [361, 54] class = Survived gini = 0.448 samples = 162 value = [107, 55] class = Survived gini = 0.447 samples = 225 value = [76, 149] class = Dead gini = 0.106 samples = 89 value = [5, 84] class = Dead Terminal Nodeী بೠ ؘఠٜਸ যڌѱ ࠙ܨೡ Ѫੋ
sklearn Code
Impurity
Impurity ࢎѾաޖח Impurity (ࠛࣽب, ࠛഛपࢿ) ծইח ߑߨਵ۽ णפ. ࣽبо ૐоೞח
Ѫਸ فҊ Information gainۄҊ ೞӝب פ. য়ט ࢎѾաޖ ࠛࣽب ஏ ߑߨ , Gini Indexܳ ҕࠗפ.
Sex <= 0.5 gini = 0.473 samples = 891 value
= [549, 342] class = Survived Fare <= 26.269 gini = 0.306 samples = 577 value = [468, 109] class = Survived True Fare <= 48.2 gini = 0.383 samples = 314 value = [81, 233] class = Dead False gini = 0.226 samples = 415 value = [361, 54] class = Survived gini = 0.448 samples = 162 value = [107, 55] class = Survived gini = 0.447 samples = 225 value = [76, 149] class = Dead gini = 0.106 samples = 89 value = [5, 84] class = Dead G = d ∑ i=1 Ri ( 1 − m ∑ k=1 p2 ik) Step 1. gini = 0.473 ਸ ҅೧ যࠁࣁਃ Step 2. gini = 0.226 ਸ ҅೧ যࠁࣁਃ
https://imgur.com/n3MVwHW
Random Forest
ৈ۞ ܻٜਸ ‘ܰѱ’ ݅ٚ. https://www.researchgate.net/figure/Architecture-of-the-random-forest-model_fig1_301638643
https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Seeing-the-Forest-for-the-Trees-An-Introduction-to-Random-Forest/ta-p/158062 bagging = bootstrap aggregating
Bagging ߓӦ(bagging) bootstrap aggregating ড۽, ࠗझە(bootstrap)ਸ ా೧ ઑӘঀ ܲ ള۲
ؘఠী ೧ ള۲ػ ӝୡ ࠙ܨӝ(base learner)ٜਸ Ѿ(aggregating)दఃח ߑߨ. ࠗझەۆ, য ള۲ ؘఠীࢲ ࠂਸ ೲਊೞৈ ਗ ؘఠࣇҗ э ӝ ؘఠࣇਸ ݅٘ח җਸ ݈ೠ. ߓӦਸ ా೧ ےؒ ನۨझܳ ള۲दఃח җ җ э ࣁ ױ҅۽ ೯ػ. 1. ࠗझە ߑߨਸ ా೧ Nѐ ള۲ ؘఠࣇਸ ࢤࢿೠ. 2. Nѐ ӝୡ ࠙ܨӝ(ܻ)ٜਸ ള۲दఅ. 3. ӝୡ ࠙ܨӝ(ܻ)ٜਸ ೞա ࠙ܨӝ(ےؒ ನۨझ)۽ Ѿೠ(ಣӐ ژח җ߈ࣻై ߑध ਊ). Wikipedia ےؒನۨझ > ߓӦਸ ਊೠ ನۨझ ҳࢿ
sklearn Code