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
1k
qeMLパッケージの紹介
caretやtidymodelsと同じような機械学習のラッパーqeMLパッケージの紹介
bob3bob3
December 15, 2023
Tweet
Share
More Decks by bob3bob3
See All by bob3bob3
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
300
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
320
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
380
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
350
パーマーステーションのペンギンたち#3 探索的データ分析(EDA)編
bob3bob3
1
450
Redditで遊ぼう #TokyoR 106
bob3bob3
0
540
シン・初心者のためのR-Tips
bob3bob3
0
360
応用セッション発表のすすめ
bob3bob3
0
700
LT発表のすすめ
bob3bob3
0
550
Other Decks in Science
See All in Science
同じデータでもP値が変わる話/key_considerations_in_NHST
florets1
1
1.1k
東大・松尾研主催 LLM Summer 2023 コンペ解法 (11位 – 20位枠での優秀賞)
hayataka88
0
200
バックアップ『しながら』ランサムウェア検出も!? セキュリティ強化が満載 Veeam 12.1
climbteam
0
340
History towards Universal Neural Network Potential for Material Discovery
matlantis
0
170
障害物を回避する バイナリマニピュレータの軌道の設計 / Design of binary manipulator trajectories avoiding obstacles
konakalab
0
100
Machine Learning for Materials (Lecture 1)
aronwalsh
1
1.5k
Direct Preference Optimization
zchenry
0
170
Machine Learning for Materials (Lecture 9)
aronwalsh
0
130
量子コンピュータとデータサイエンティスト
fuyu_quant0
0
150
Machine Learning for Materials (Lecture 7)
aronwalsh
0
740
【論文紹介】DocTr_ Document Transformer for Structured Information Extraction in Documents / iccv2023-doctr
yuya4
3
600
データで課題を解決する -因果関係を調べる統計的因果推論-
sshimizu2006
4
1.4k
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
12
1.1k
The World Runs on Bad Software
bkeepers
PRO
61
6.8k
Stop Working from a Prison Cell
hatefulcrawdad
266
19k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
8
3.5k
Why Our Code Smells
bkeepers
PRO
331
56k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Unsuck your backbone
ammeep
664
57k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
For a Future-Friendly Web
brad_frost
172
9k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
23
1.7k
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!