Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
decisiontree
Search
yuki
February 07, 2021
3.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
decisiontree
yuki
February 07, 2021
More Decks by yuki
See All by yuki
240315_発表資料_清水.pdf
yuyumoyuyu
2
870
230315_symposium
yuyumoyuyu
1
620
220305_kenkyukai
yuyumoyuyu
3
200
221124_kenkyukai
yuyumoyuyu
1
610
voltageequation5
yuyumoyuyu
2
12k
210910_kenkyukai
yuyumoyuyu
1
340
210826_bumontaikai
yuyumoyuyu
0
260
voltageequation4
yuyumoyuyu
33
16k
210518_iemdc
yuyumoyuyu
0
190
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
600
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Prompt Engineering for Job Search
mfonobong
0
450
Practical Orchestrator
shlominoach
191
12k
Google's AI Overviews - The New Search
badams
0
1.6k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
570
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
850
How to train your dragon (web standard)
notwaldorf
97
6.8k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
360
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
エンジニアに許された特別な時間の終わり
watany
109
250k
Transcript
決定木 Decision Tree 大阪府立大学 工学研究科 清水 悠生
2 決定木とは ✓ 木構造を用いてクラス分類や回帰を行う機械学習手法 ✓ クラス分類⇒分類木,回帰⇒回帰木 ✓ Yes/Noで回答可能な質問で構成される 階層的な木構造を有するため,視覚的にもわかりやすい ✓
本記事では,CART(Classifciation and Regression Trees) と呼ばれるアルゴリズムについて解説
3 分類木の問題 ✓ 2つのクラスの分類境界を求める問題を考える x 1 x 2 Class A
Class B
4 分類木の構築イメージ ✓ 2つのクラスを分類可能なYes/No形式の質問を構築する x 1 x 2 10 x
1 x 2 10 5 x 1 x 2 10 5 4 質問① 質問② 質問③ x 2 > 10 ? x 1 > 5 ? Class A Class B Yes No x 2 > 4 ? Yes No Yes No Class A Class B ① ② ③ 構築する分類木
5 回帰木のイメージ ✓ 回帰木も同様にYes/No形式の質問を構築する ✓ 回帰木の出力は,例えば領域内の平均値 x 1 x 2
10 5 4 5.0 4.8 4.6 2.3 4.5 4.3 1.9 2.1 3.3 3.1 3.5 x 2 > 10 ? x 1 > 5 ? y = 4.8 Yes No x 2 > 4 ? Yes No Yes No 構築する回帰木 y = 4.4 y = 3.3 y = 2.2 y(i) y(i): 各データの出力値 ※各領域の平均値を出力とする
6 回帰木のイメージ(1次元) ✓ 1次元のほうが直感的に理解しやすい ✓ 回帰木によって回帰曲線(曲面)を構築する ✓ 回帰曲線(曲面)はステップ状になる x y
x > 10 ? x > 5 ? y = y 1 Yes No Yes No 構築する回帰木 y = y 2 y = y 3 ※各領域の平均値を出力とする 5 10 y 1 y 3 y 2
7 説明変数と閾値をどうやって選択するか? ✓ 説明変数と閾値の全ての組み合わせにおいて 損失関数を計算し,損失が最小となる組み合わせを選択 x 2 > 10 ?
x 1 > 5 ? Class A Class B Yes No x 2 > 4 ? Yes No Yes No Class A Class B ① ② ③ :説明変数 :閾値
8 分類木で扱う損失関数 ✓ 分類木で扱う損失関数には以下のようなものが存在 𝐻 𝑄𝑚 = 𝑘 𝑝𝑚𝑘
1 − 𝑝𝑚𝑘 ジニ係数 交差エントロピー Misclassification 𝐻 𝑄𝑚 = − 𝑘 𝑝𝑚𝑘 log 𝑝𝑚𝑘 𝐻 𝑄𝑚 = 1 − max 𝑘 𝑝𝑚𝑘 𝐻 𝑄𝑚 : m番目のノードの損失関数 𝑘: 分類するクラス数 (2クラス分類 ⇒ k=1,2) 𝑝𝑚𝑘 : m番目のノードにおける クラス k のサンプルの割合
9 回帰木で扱う損失関数 ✓ 回帰木で扱う損失関数には以下のようなものが存在 𝐻 𝑄𝑚 = 1 𝑁𝑚
𝑗 𝑦(𝑗) − ത 𝑦𝑚 平均二乗誤差 Half Poisson Deviance 平均絶対誤差 𝐻 𝑄𝑚 = 1 𝑁𝑚 𝑗 𝑦(𝑗) log 𝑦(𝑗) ത 𝑦𝑚 − 𝑦(𝑗) + ത 𝑦𝑚 𝐻 𝑄𝑚 = 1 𝑁𝑚 𝑗 𝑦(𝑗) − median 𝑦(𝑗) 𝑁𝑚 : m番目のノードのサンプル数 𝑦(𝑗): m番目のノードの j番目の目的変数の値 ത 𝑦𝑚 : m番目のノードの 全ての目的変数の平均値
10 決定木のメリット・デメリット ✓ メリット • 容易に可視化可能で,解釈がしやすい • スケールに依存せず,標準化や正規化の必要がない ✓ デメリット
• 過学習しやすく,汎化性能が低い傾向にある • 回帰木において,外挿が不可能