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
decisiontree
Search
yuki
February 07, 2021
3.3k
0
Share
decisiontree
yuki
February 07, 2021
More Decks by yuki
See All by yuki
240315_発表資料_清水.pdf
yuyumoyuyu
2
800
230315_symposium
yuyumoyuyu
1
570
220305_kenkyukai
yuyumoyuyu
3
160
221124_kenkyukai
yuyumoyuyu
1
560
voltageequation5
yuyumoyuyu
1
12k
210910_kenkyukai
yuyumoyuyu
1
320
210826_bumontaikai
yuyumoyuyu
0
210
voltageequation4
yuyumoyuyu
33
15k
210518_iemdc
yuyumoyuyu
0
170
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
300
Prompt Engineering for Job Search
mfonobong
0
280
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
450
It's Worth the Effort
3n
188
29k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Speed Design
sergeychernyshev
33
1.6k
Designing Powerful Visuals for Engaging Learning
tmiket
1
350
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
900
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 決定木のメリット・デメリット ✓ メリット • 容易に可視化可能で,解釈がしやすい • スケールに依存せず,標準化や正規化の必要がない ✓ デメリット
• 過学習しやすく,汎化性能が低い傾向にある • 回帰木において,外挿が不可能