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
qeMLパッケージの紹介
Search
bob3bob3
December 15, 2023
Science
0
2.3k
qeMLパッケージの紹介
caretやtidymodelsと同じような機械学習のラッパーqeMLパッケージの紹介
bob3bob3
December 15, 2023
Tweet
Share
More Decks by bob3bob3
See All by bob3bob3
RとLLMで自然言語処理
bob3bob3
3
790
RでPSM分析
bob3bob3
1
400
Rでコンジョイント分析 2024年版
bob3bob3
0
2.1k
『改訂新版前処理大全』の話と Apache Parquet の話 #TokyoR
bob3bob3
0
1.3k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
620
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
560
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
630
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
620
パーマーステーションのペンギンたち#3 探索的データ分析(EDA)編
bob3bob3
1
800
Other Decks in Science
See All in Science
データベース03: 関係データモデル
trycycle
PRO
1
340
コミュニティサイエンスの実践@日本認知科学会2025
hayataka88
0
120
HajimetenoLT vol.17
hashimoto_kei
1
170
Performance Evaluation and Ranking of Drivers in Multiple Motorsports Using Massey’s Method
konakalab
0
140
MCMCのR-hatは分散分析である
moricup
0
580
学術講演会中央大学学員会府中支部
tagtag
PRO
0
350
白金鉱業Meetup_Vol.20 効果検証ことはじめ / Introduction to Impact Evaluation
brainpadpr
2
1.6k
先端因果推論特別研究チームの研究構想と 人間とAIが協働する自律因果探索の展望
sshimizu2006
3
760
Optimization of the Tournament Format for the Nationwide High School Kyudo Competition in Japan
konakalab
0
140
コンピュータビジョンによるロボットの視覚と判断:宇宙空間での適応と課題
hf149
1
520
あなたに水耕栽培を愛していないとは言わせない
mutsumix
1
240
People who frequently use ChatGPT for writing tasks are accurate and robust detectors of AI-generated text
rudorudo11
0
190
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
210
Designing Powerful Visuals for Engaging Learning
tmiket
0
220
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
We Have a Design System, Now What?
morganepeng
54
8k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
120
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.3k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
55
Balancing Empowerment & Direction
lara
5
880
Transcript
qeMLパッケージの紹介 R研究集会2023 (2023/12/16) @bob3bob3
qeMLパッケージとは? • caret、mlr3、tidymodelsと同じような、機械 学習に統一的なインターフェイスを提供する ラッパー。 • 「qe」は「quick and easy」。 •
とにかくシンプルで「 one liner」で機械学習を 事項できるのが売り。
作者 Norman Matloff The Art of R Programming (2011) の著者。
実行例 library(qeML) # メジャーリーガーのデータセット。ポジション、身長、体重、年齢 data(mlb1) # 体重を推定するモデル # 決定木、ランダムフォレスト、勾配ブースティング mlb1_rpart
<- mlb1 |> qeRpart("Weight") mlb1_rf <- mlb1 |> qeRFranger("Weight") mlb1_gb <- mlb1 |> qeGBoost("Weight")
実行例 # 推定 new_data <- data.frame(Position='Catcher', Height=73, Age=28) mlb1_rpart |>
predict(new_data) mlb1_rf |> predict(new_data) mlb1_gb |> predict(new_data) # これだけ! # 簡単だね!
Enjoy?
いやいや、まてまて • バリデーションは? • ハイパーパラメーターのチューニングは?
バリデーションは勝手にやってくれる # testデータでのMAE mlb1_rpart$testAcc mlb1_rf$testAcc mlb1_gb$testAcc data.frame( name = c("rpart",
"rf", "gb"), MAE = list(mlb1_rpart, mlb1_rf, mlb1_gb) |> map_dbl(\(x) pluck(x, "testAcc")) ) |> arrange(MAE) # name MAE # 1 rf 13.23741 # 2 gb 13.74169 # 3 rpart 14.24358
チューニングもできる # ランダムフォレストのグリッドサーチ例 qs_ft_rf <- mlb1 |> qeFT( "Weight", "qeRFranger",
pars = list(nTree= seq(100, 1000, 250), minNodeSize= seq(10, 30, 10)), nTst = 100, nXval = 10, showProgress=TRUE ) qs_ft_rf$outdf |> slice_min(meanAcc) # nTree minNodeSize meanAcc CI bonfCI # 1 350 10 8.326976 8.531146 8.653432
その他の機能 • 次元縮約、次元削減 • 並列化 • 欠損補完 • モデルの比較 •
Quick Start, ML Overviewなど親切なビネットがたくさん! • データセットも山盛り
……ただし • まだまだ開発中で発展途上。 • ドキュメントも書きかけという感じ。 • 実装されている手法がcaret、tidymodelsと比べるとまだ少ない。 • 実装が不完全な手法もある(xgboost, lightgbmなど)
• バリデーションの評価指標を変更ができない • Macだとインストールできないらしい(誰か検証して!)
Enjoy!