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
630
220305_kenkyukai
yuyumoyuyu
3
210
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
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
600
So, you think you're a good person
axbom
PRO
2
2.2k
How to train your dragon (web standard)
notwaldorf
97
6.8k
The Language of Interfaces
destraynor
162
27k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
340
Bash Introduction
62gerente
615
220k
Statistics for Hackers
jakevdp
799
230k
Chasing Engaging Ingredients in Design
codingconduct
0
340
The browser strikes back
jonoalderson
0
1.7k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
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 決定木のメリット・デメリット ✓ メリット • 容易に可視化可能で,解釈がしやすい • スケールに依存せず,標準化や正規化の必要がない ✓ デメリット
• 過学習しやすく,汎化性能が低い傾向にある • 回帰木において,外挿が不可能