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.1k
qeMLパッケージの紹介
caretやtidymodelsと同じような機械学習のラッパーqeMLパッケージの紹介
bob3bob3
December 15, 2023
Tweet
Share
More Decks by bob3bob3
See All by bob3bob3
RとLLMで自然言語処理
bob3bob3
3
560
RでPSM分析
bob3bob3
1
290
Rでコンジョイント分析 2024年版
bob3bob3
0
1.4k
『改訂新版前処理大全』の話と Apache Parquet の話 #TokyoR
bob3bob3
0
1.1k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
580
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
510
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
590
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
580
パーマーステーションのペンギンたち#3 探索的データ分析(EDA)編
bob3bob3
1
730
Other Decks in Science
See All in Science
論文紹介 音源分離:SCNET SPARSE COMPRESSION NETWORK FOR MUSIC SOURCE SEPARATION
kenmatsu4
0
250
研究って何だっけ / What is Research?
ks91
PRO
1
110
機械学習 - SVM
trycycle
PRO
1
860
ド文系だった私が、 KaggleのNCAAコンペでソロ金取れるまで
wakamatsu_takumu
2
760
Valuable Lessons Learned on Kaggle’s ARC AGI LLM Challenge (PyDataGlobal 2024)
ianozsvald
0
400
「美は世界を救う」を心理学で実証したい~クラファンを通じた新しい研究方法
jimpe_hitsuwari
1
140
テンソル分解による糖尿病の組織特異的遺伝子発現の統合解析を用いた関連疾患の予測
tagtag
2
200
[第62回 CV勉強会@関東] Long-CLIP: Unlocking the Long-Text Capability of CLIP / kantoCV 62th ECCV 2024
lychee1223
1
960
機械学習 - K-means & 階層的クラスタリング
trycycle
PRO
0
1k
ウェブ・ソーシャルメディア論文読み会 第25回: Differences in misinformation sharing can lead to politically asymmetric sanctions (Nature, 2024)
hkefka385
0
120
機械学習 - pandas入門
trycycle
PRO
0
280
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
130
Featured
See All Featured
Writing Fast Ruby
sferik
628
62k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Balancing Empowerment & Direction
lara
1
480
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
Faster Mobile Websites
deanohume
308
31k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Designing Experiences People Love
moore
142
24k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing for Performance
lara
610
69k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
360
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
710
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!