Building machine learning models in R with mikropml: preprocessing data (CC125)
Channel: Riffomonas Project
Date: 2021-07-09

Building machine learning models is not a plug and play process. It requires preprocesing of data and fine tuning of parameters. See how to preprocess your data with the mikropml R package. The benefits are a more robust model and more efficient training. In this episode of Code Club, Pat uses the #preprocess_data function from #mikropml to show how it centers and scales data, removes features that has near zero variance, groups features that are perfectly correlated, and handles missing data. 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 mikropml R package and data handling functions from dplyr in #RStudio. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-07-09-mikropml-preprocess.


If you're interested in taking an upcoming 3 day R workshop, email me at riffomonas@gmail.com!

R: https://r-project.org
RStudio: https://rstudio.com
Raw data: https://github.com/riffomonas/raw_data/releases/latest
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 Why preprocess data?
4:26 Creating practice data set
7:49 Approaches to scaling data
12:05 Removing features with near zero variance
13:31 Grouping columns that are perfectly correlated
15:54 Preprocessing real data set
17:57 Building models w/ and w/o preprocessed data
19:30 Recap