How to run your R code in parallel with the furrr package (CC127)

Описание к видео How to run your R code in parallel with the furrr package (CC127)

If you have a function that you are repeating multiple times in R using the map or apply functions, you can speed it up by running it in parallel using the furrr package. In this episode of Code Club, Pat runs the run_ml function from mikropml 100 times using the future_map function to get it to run faster as he tries to evaluate different hyperparameter settings for a machine learning model. He describes how to set up parallelization and uses the tictoc package to time the performance of the code run in series vs parallel. The data he uses is from a microbiome study his lab has published looking for biomarkers associated with colorectal cancer.

In this episode, Pat will use functions from the #furrr, #tictoc, and #mikropml R packages and data handling functions from dplyr and the rest of the tidyverse in #RStudio. The accompanying blog post can be found at https://www.riffomonas.org/code_club/....


If you're interested in taking an upcoming 3 day R workshop, email me at [email protected]!

R: https://r-project.org
RStudio: https://rstudio.com
Raw data: https://github.com/riffomonas/raw_dat...
Workshops: https://www.mothur.org/wiki/workshops

You can also find complete tutorials for learning R with the tidyverse using...
Microbial ecology data: https://www.riffomonas.org/minimalR/
General data: https://www.riffomonas.org/generalR/

0:00 Introduction
2:54 Timing serial execution of code
6:26 Parallelizing code with furrr package
12:56 Synthesizing 100 splits
15:08 Recap

Комментарии

Информация по комментариям в разработке