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
特徴量の重要度計算を実装する ランダムフォレストを実装する
Search
NearMeの技術発表資料です
PRO
September 28, 2023
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
特徴量の重要度計算を実装する ランダムフォレストを実装する
NearMeの技術発表資料です
PRO
September 28, 2023
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Claude Code × git worktree で並列開発 (続き) -差分のサービスだけを併設する-
nearme_tech
PRO
1
52
Claude Code × git worktree で並列開発 — サブモジュール構成のリポジトリで成立させる —
nearme_tech
PRO
0
55
LLM + 強化学習
nearme_tech
PRO
0
32
PosthogのA/Bテスト機能の紹介
nearme_tech
PRO
1
53
AIフレンドリーなプロダクトに向けて
nearme_tech
PRO
2
65
初めてのLean言語
nearme_tech
PRO
0
100
Apache Airflow Workflow orchestration without turning cron into spaghetti
nearme_tech
PRO
2
38
実務で役立つ幾何学 ボロノイ図の基礎から グラフ・ネットワーク応用まで
nearme_tech
PRO
1
76
SQL/ID抽出タスクから考える 実践的なハルシネーション対策
nearme_tech
PRO
1
89
Featured
See All Featured
Faster Mobile Websites
deanohume
310
32k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
My Coaching Mixtape
mlcsv
0
310
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
The browser strikes back
jonoalderson
0
1.7k
Navigating Weather and Climate Data
rabernat
0
510
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
How GitHub (no longer) Works
holman
316
150k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Transcript
0 特徴量の重要度計算を実装する ランダムフォレストを実装する 2023-09-15 第60回NearMe技術勉強会 Takuma Kakinoue
1 今回の実装のコミット https://github.com/kakky-hacker/algorithm_sandbox/commit/8f466be9c1fae0d7 bf3bc1bff1a5d1327e4a324d 1
2 Feature importanceの実装 • Feature importance の2種類の定義 • 分割に使われた回数(split) •
分割において得られた情報ゲインの総和(gain) ← こちらを採⽤ class Node: … def feature_importance(self, importance_value): if not self.is_leaf: importance_value[self.split_feature_index] += self.gain self.left_node.feature_importance(importance_value) self.right_node.feature_importance(importance_value) return importance_value ルートノードから 情報ゲインを再帰的に ⾜し合わせていく
3 ランダムフォレストの実装 • 実装としては決定⽊を並列にアンサンブルするだけ • 既存の決定⽊の変更箇所(core.py) ◦ 決定⽊で使⽤しない特徴量をマスク形式で⼊⼒に加える • 新規実装(random_forest.py)
◦ ランダムフォレストのメイン処理 ▪ 特徴量マスクをランダムに⽣成して決定⽊学習 ▪ 推論時は、各決定⽊の出⼒を多数決 3
4 Borutaの実装(途中) • Borutaとは • 特徴量選択⼿法の1つ • ランダムな特徴量(shadow feature)を⼊⼒に結合し、 オリジナル特徴量とランダムな特徴量の重要度を⽐較する
• 学習を100回⾏い、上記⽐較のt検定を実施し、 真に重要なオリジナル特徴量を選択する 4
5 次回予告 • ⾃作ランダムフォレストとscikit-learnのランダムフォレストの 性能を⽐較する。 • 勾配ブースティングを実装する。 • ⾃動ハイパーパラメータチューニングを実装する。 5
6 Thank you