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
970
qeMLパッケージの紹介
caretやtidymodelsと同じような機械学習のラッパーqeMLパッケージの紹介
bob3bob3
December 15, 2023
Tweet
Share
More Decks by bob3bob3
See All by bob3bob3
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
『データ可視化学入門』をPythonからRに翻訳した話(増強版)
bob3bob3
0
300
『データ可視化学入門』を PythonからRに翻訳した話
bob3bob3
1
370
「国と音楽」 ~spotifyrを用いて~ #muana
bob3bob3
2
330
パーマーステーションのペンギンたち#3 探索的データ分析(EDA)編
bob3bob3
1
430
Redditで遊ぼう #TokyoR 106
bob3bob3
0
540
シン・初心者のためのR-Tips
bob3bob3
0
350
応用セッション発表のすすめ
bob3bob3
0
690
LT発表のすすめ
bob3bob3
0
540
Other Decks in Science
See All in Science
20240127_OpenRadiossエアバッグ解析
kamakiri1225
0
150
同じデータでもP値が変わる話/key_considerations_in_NHST
florets1
1
1.1k
データで課題を解決する -因果関係を調べる統計的因果推論-
sshimizu2006
4
1.3k
A Theory of Scrum Team Effectiveness 〜『ゾンビスクラムサバイバルガイド』の裏側にある科学〜
bonotake
13
5.1k
勉強会資料 / “Asymptotic Statistics” Section 2.1
asymptotic_minato
0
230
AI(人工知能)の過去・現在・未来 —AIは人間を超えるのか—
tagtag
0
230
Leveraging conformal prediction for calibrated probabilistic time series forecasts to accelerate the renewable energy transition
ingevandenende
2
260
Презентация программы бакалавриата СПбГУ "Искусственный интеллект и наука о данных"
dscs
0
120
ultraArmをモニター提供してもらった話
miura55
0
120
Direct Preference Optimization
zchenry
0
150
JSol'Ex : solar image processing in Java
melix
0
250
拡散モデルの概要 −§1. 拡散モデルで使われる確率微分⽅程式について−
nearme_tech
0
100
Featured
See All Featured
KATA
mclloyd
16
12k
Building Adaptive Systems
keathley
32
1.9k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
Product Roadmaps are Hard
iamctodd
45
9.7k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
Designing for humans not robots
tammielis
248
25k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
275
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
228
16k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
5
1.3k
Making Projects Easy
brettharned
109
5.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
Scaling GitHub
holman
457
140k
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!