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の技術発表資料です
AIエージェントのための 隔離された安全なインフラ設計
nearme_tech
PRO
0
23
Claude Code × git worktree で並列開発 (続き) -差分のサービスだけを併設する-
nearme_tech
PRO
1
69
Claude Code × git worktree で並列開発 — サブモジュール構成のリポジトリで成立させる —
nearme_tech
PRO
0
79
LLM + 強化学習
nearme_tech
PRO
0
37
PosthogのA/Bテスト機能の紹介
nearme_tech
PRO
1
110
AIフレンドリーなプロダクトに向けて
nearme_tech
PRO
2
71
初めてのLean言語
nearme_tech
PRO
0
110
Apache Airflow Workflow orchestration without turning cron into spaghetti
nearme_tech
PRO
2
50
実務で役立つ幾何学 ボロノイ図の基礎から グラフ・ネットワーク応用まで
nearme_tech
PRO
1
93
Featured
See All Featured
How to build a perfect <img>
jonoalderson
1
6.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
How to Ace a Technical Interview
jacobian
280
24k
Bash Introduction
62gerente
615
220k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Leo the Paperboy
mayatellez
10
2.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Fireside Chat
paigeccino
43
4.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
The Invisible Side of Design
smashingmag
301
52k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
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