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
EnsembleDecisionTree
Search
yuki
February 21, 2021
11k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
EnsembleDecisionTree
yuki
February 21, 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
250
voltageequation4
yuyumoyuyu
33
16k
210518_iemdc
yuyumoyuyu
0
190
Featured
See All Featured
Odyssey Design
rkendrick25
PRO
2
800
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.4k
The Pragmatic Product Professional
lauravandoore
37
7.4k
The Curious Case for Waylosing
cassininazir
1
500
Heart Work Chapter 1 - Part 1
lfama
PRO
9
36k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
45k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Done Done
chrislema
186
16k
Designing for Performance
lara
611
70k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Transcript
決定木のアンサンブル法 ・ランダムフォレスト ・勾配ブースティング決定木 Decision Tree Ensemble -Random Forest -Gradient Boosting
Decision Tree 大阪府立大学 工学研究科 清水 悠生
2 はじめに ✓ 本記事は決定木↓の理解を前提に書いています ✓ https://yuyumoyuyu.com/2021/02/07/decisiontree/ ✓ 具体的な解析結果やPythonプログラムは GitHubを参照してください ✓
https://github.com/yshimizu12/EnsembleDecisionTree
3 アンサンブル学習とは ✓ 同一のデータセットから複数の学習器を学習し その結果を統合して汎化能力を向上する方法 ⇒アンサンブル学習 データ セット 予測 結果
学習器1 学習器2 学習器n …
4 2種類の決定木アンサンブル学習 ✓ 決定木は汎化性能が低いため, アンサンブル学習を利用することがほとんど ✓ 決定木アンサンブル学習は下記の2つが代表的 ⚫ ランダムフォレスト ⚫
勾配ブースティング決定木
5 ランダムフォレスト ✓ あるデータセットからサブデータセットを複数作成し それぞれを使って独立した決定木を学習し 学習結果を統合するモデル⇒ランダムフォレスト データ セット 予測 結果
決定木1 決定木2 決定木n … サブ データ1 予測1 サブ データ2 予測2 サブ データn 予測n
6 サブデータセットの作り方 ✓ データセットから重複ありでデータを抽出し, データセットと同じサイズのサブデータをn個生成する ✓ ブートストラップサンプリングと呼ぶ データセット No. 寸法1
寸法2 寸法3 トルク 1 5 mm 6 mm 2 mm 3 Nm 2 3 mm 7 mm 1 mm 4 Nm 3 2 mm 5 mm 1 mm 2 Nm 4 4 mm 6 mm 2 mm 5 Nm No. 寸法1 寸法2 寸法3 トルク 1 5 6 2 3 2 3 7 1 4 1 5 6 2 3 3 2 5 1 2 No. 寸法1 寸法2 寸法3 トルク 4 4 6 2 5 4 4 6 2 5 1 5 6 2 3 1 5 6 2 3 No. 寸法1 寸法2 寸法3 トルク 3 2 5 1 2 2 3 7 1 4 4 4 6 2 5 3 2 5 1 2 サブデータセット1 サブデータセット2 サブデータセット3
7 決定木で使用する特徴量選択 ✓ ランダムフォレストが高い汎化性能を有するには 決定木同士が異なる構造を持つほうがよい ✓ 特徴量をランダムに選択して学習を行う No. 寸法1 寸法2
寸法3 トルク 1 5 6 2 3 2 3 7 1 4 1 5 6 2 3 3 2 5 1 2 No. 寸法1 寸法2 寸法3 トルク 4 4 6 2 5 4 4 6 2 5 1 5 6 2 3 1 5 6 2 3 No. 寸法1 寸法2 寸法3 トルク 3 2 5 1 2 2 3 7 1 4 4 4 6 2 5 3 2 5 1 2 サブデータセット1 サブデータセット2 サブデータセット3 No. 寸法2 寸法3 トルク 1 6 2 3 2 7 1 4 1 6 2 3 3 5 1 2 No. 寸法1 寸法3 トルク 4 4 2 5 4 4 2 5 1 5 2 3 1 5 2 3 No. 寸法1 寸法2 トルク 3 2 5 2 2 3 7 4 4 4 6 5 3 2 5 2
8 各決定木の結果の統合 ✓ 各決定木の出力を統合する方法は下記の通り ⚫ 回帰:各決定木の平均値 ⚫ 分類:各決定木の出力ラベルの確率平均により決定 A: 60%
B: 40% 決定木1 決定木2 決定木3 A: 70% B: 30% A: 65% B: 35% A: 45% B: 55% A! 2クラス分類の例
9 勾配ブースティング決定木 ✓ 構築した決定木の損失関数の結果から 予測誤差を減らすように次々と決定木を構築・学習し 学習結果を統合するモデル⇒勾配ブースティング決定木 データ セット 予測 結果
決定木1 決定木2 決定木n … 予測1 予測2 予測n 予測 誤差1 予測 誤差1 予測 誤差2 予測 誤差n-1 … …
10 勾配ブースティング決定木のアルゴリズム ✓ 勾配ブースティング決定木のアルゴリズムは下記の通り 1. 最初の決定木を構築 2. 真値に対する誤差を計算(実際は誤差関数の勾配) 3. 誤差を利用して,誤差が小さくなるよう木を構築
4. 2,3を繰り返す 1 2 t … + + + + = ො 𝑦1 = ො 𝑦2 = ො 𝑦𝑡 Step.1 決定木を構築 ො 𝑦𝑡 真値 𝑦 ො 𝑦2 ො 𝑦1 0 1 2 t Step.2 誤差を 計算 Step.3 誤差から新たな木を構築
11 よく使われる手法 ✓ Pythonでは勾配ブースティングの派生として 高精度かつ学習時間が短い下記がよく用いられる ⚫ XGBoost ⚫ LightGBM ✓
実装例はこちら↓ ✓ https://github.com/yshimizu12/EnsembleDecisionTree