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
2.5k
0
Share
qeMLパッケージの紹介
caretやtidymodelsと同じような機械学習のラッパーqeMLパッケージの紹介
bob3bob3
December 15, 2023
More Decks by bob3bob3
See All by bob3bob3
RとLLMで自然言語処理
bob3bob3
3
870
RでPSM分析
bob3bob3
1
430
Rでコンジョイント分析 2024年版
bob3bob3
0
2.4k
『改訂新版前処理大全』の話と Apache Parquet の話 #TokyoR
bob3bob3
0
1.4k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
650
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
580
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
650
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
640
パーマーステーションのペンギンたち#3 探索的データ分析(EDA)編
bob3bob3
1
850
Other Decks in Science
See All in Science
20260220 OpenIDファウンデーション・ジャパン ご紹介 / 20260220 OpenID Foundation Japan Intro
oidfj
0
320
人生を変えた一冊「独学大全」のはなし / Self-study ENCYCLOPEDIA: The Book Which Change My Life #独学大全 #EM推し本
expajp
0
150
20251212_LT忘年会_データサイエンス枠_新川.pdf
shinpsan
0
280
機械学習 - K-means & 階層的クラスタリング
trycycle
PRO
0
1.4k
検索と推論タスクに関する論文の紹介
ynakano
1
190
Non-Gaussian, nonlinear causal discovery with hidden variables and application
sshimizu2006
0
120
コンピュータビジョンによるロボットの視覚と判断:宇宙空間での適応と課題
hf149
1
650
Physical AIを支えるWeights & Biases
olachinkei
1
310
Testing the Longevity Bottleneck Hypothesis
chinson03
0
270
データマイニング - グラフ埋め込み入門
trycycle
PRO
1
210
Kaggle: NeurIPS - Open Polymer Prediction 2025 コンペ 反省会
calpis10000
0
550
ド文系だった私が、 KaggleのNCAAコンペでソロ金取れるまで
wakamatsu_takumu
2
2.3k
Featured
See All Featured
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
130
Into the Great Unknown - MozCon
thekraken
41
2.4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
110
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
130
Information Architects: The Missing Link in Design Systems
soysaucechin
0
920
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.7k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
140
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
110
Code Review Best Practice
trishagee
74
20k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
A Soul's Torment
seathinner
6
2.8k
Chasing Engaging Ingredients in Design
codingconduct
0
180
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!