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
2.1k
Other Decks in Technology
See All in Technology
AWS re:Invent 2024で発表された コードを書く開発者向け機能について
maruto
0
170
新機能VPCリソースエンドポイント機能検証から得られた考察
duelist2020jp
0
180
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
130
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
360
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
260
なぜCodeceptJSを選んだか
goataka
0
110
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
460
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
170
AWS re:Invent 2024 re:Cap CloudFront編
yoshimi0227
0
330
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
180
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
100
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
240
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.3k
GitHub's CSS Performance
jonrohan
1030
460k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
We Have a Design System, Now What?
morganepeng
51
7.3k
Building Your Own Lightsaber
phodgson
103
6.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Become a Pro
speakerdeck
PRO
26
5k
Fireside Chat
paigeccino
34
3.1k
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