R Machine Learning Skill
Sub-skills
| Sub-skill |
Description |
| r-ml-frameworks |
tidymodels, caret, mlr3, h2o |
| r-ml-boosting |
xgboost, lightgbm, gbm |
| r-ml-trees |
randomForest, ranger, rpart |
| r-ml-regularization |
glmnet, lasso, elastic-net |
| r-ml-deeplearning |
torch, keras, neural networks |
| r-ml-timeseries |
prophet, fable, forecast |
| r-ml-survival |
survival, survminer |
| r-ml-anomaly |
AnomalyDetection, anomalize |
Machine learning and predictive modeling in R.
ML Frameworks
| Package |
Description |
| caret ★ |
Classification and Regression Training |
| mlr3 ★ |
Next-gen extensible ML framework |
| tidymodels ★ |
Tidyverse-friendly modeling |
| h2o |
Deep learning, RF, GBM, GLM |
Gradient Boosting
| Package |
Description |
| xgboost ★ |
eXtreme Gradient Boosting |
| lightgbm ★ |
Light Gradient Boosting Machine |
| gbm |
Generalized Boosted Regression |
| bst |
Gradient Boosting |
| mboost |
Model-Based Boosting |
| CoxBoost |
Cox models boosting |
| GAMBoost |
GAM boosting |
| gamboostLSS |
GAMLSS boosting |
| GMMBoost |
Mixed models boosting |
Tree-Based Methods
| Package |
Description |
| randomForest |
Breiman's random forests |
| ranger ★ |
Fast random forests |
| randomForestSRC |
RF for survival/regression/classification |
| rpart |
Recursive partitioning trees |
| party |
Recursive partitioning lab |
| partykit |
Partitioning toolkit |
| C50 |
C5.0 Decision Trees |
| Cubist |
Rule-based regression |
| evtree |
Evolutionary trees |
| tree |
Classification/regression trees |
| bigrf |
Big Random Forests |
Regularization & Linear Models
| Package |
Description |
| glmnet ★ |
Lasso and elastic-net GLMs |
| lars |
Least Angle Regression, Lasso |
| elasticnet |
Elastic-Net, Sparse PCA |
| penalized |
L1/L2 penalized estimation |
| ncvreg |
SCAD/MCP regularization |
| grplasso |
Group Lasso |
| grpreg |
Grouped covariates regularization |
| L0Learn |
Best subset selection |
Neural Networks & Deep Learning
| Package |
Description |
| torch ★ |
PyTorch-like tensors/NNs |
| MXNet |
Flexible GPU deep learning |
| nnet |
Feed-forward NNs |
| RSNNS |
Stuttgart NN Simulator |
| keras |
Keras interface |
Mixed Effects Models
| Package |
Description |
| lme4 ★ |
Mixed-effects models |
| nlme |
Mixed-effects with custom covariance |
| glmmTMB |
Generalized mixed-effects |
Time Series & Forecasting
| Package |
Description |
| prophet ★ |
Facebook's forecasting tool |
| fable |
Tidy forecasting |
| forecast |
Time series forecasting |
Anomaly Detection
| Package |
Description |
| AnomalyDetection |
Twitter's anomaly detection |
| anomalize |
Tidy anomaly detection |
| BreakoutDetection |
Twitter's breakout detection |
| CausalImpact |
Google's causal inference |
SVM & Kernel Methods
| Package |
Description |
| kernlab |
Kernel-based ML lab |
| e1071 |
SVM, Naive Bayes, etc. |
| LiblineaR |
Linear predictive models |
| svmpath |
SVM path algorithm |
| penalizedSVM |
Feature selection SVM |
Clustering & Dimensionality
| Package |
Description |
| kohonen |
Self-Organizing Maps |
| Rsomoclu |
Parallel SOM |
| hda |
Heteroscedastic Discriminant Analysis |
| klaR |
Classification and visualization |
Feature Selection
| Package |
Description |
| Boruta |
All-relevant feature selection |
| FSelector |
Subset-search/ranking selection |
| varSelRF |
Variable selection with RF |
Survival Analysis
| Package |
Description |
| survival ★ |
Survival analysis |
| survminer |
Survival visualization |
| ahaz |
Additive hazards regression |
Other
| Package |
Description |
| arules |
Association rules mining |
| rattle |
GUI for data mining |
| rminer |
Simplified NN/SVM usage |
| ROCR |
Classifier performance visualization |
| SuperLearner |
Ensemble learning |
| RWeka |
Weka interface |
Quick Examples
# tidymodels workflow
library(tidymodels)
split <- initial_split(df, prop = 0.8)
train <- training(split)
test <- testing(split)
model <- rand_forest(trees = 100) %>%
set_engine("ranger") %>%
set_mode("classification")
recipe <- recipe(target ~ ., data = train) %>%
step_normalize(all_numeric())
workflow <- workflow() %>%
add_model(model) %>%
add_recipe(recipe)
fit <- workflow %>% fit(data = train)
predict(fit, test)
# xgboost
library(xgboost)
dtrain <- xgb.DMatrix(data = as.matrix(train_x), label = train_y)
model <- xgb.train(
params = list(objective = "binary:logistic", max_depth = 6),
data = dtrain, nrounds = 100
)
# caret
library(caret)
ctrl <- trainControl(method = "cv", number = 5)
model <- train(target ~ ., data = train, method = "rf", trControl = ctrl)
Resources
Source: LeoLin990405/r-analytics-skill — distributed by TomeVault.
1---2name: r-ml3description: R machine learning packages. Use for classification, regression, clustering, deep learning, gradient boosting (xgboost, lightgbm), random forests, neural networks, and time series forecasting. Use when this capability is needed.4---56# R Machine Learning Skill78## Sub-skills910| Sub-skill | Description |11|-----------|-------------|12| [r-ml-frameworks](r-ml-frameworks/SKILL.md) | tidymodels, caret, mlr3, h2o |13| [r-ml-boosting](r-ml-boosting/SKILL.md) | xgboost, lightgbm, gbm |14| [r-ml-trees](r-ml-trees/SKILL.md) | randomForest, ranger, rpart |15| [r-ml-regularization](r-ml-regularization/SKILL.md) | glmnet, lasso, elastic-net |16| [r-ml-deeplearning](r-ml-deeplearning/SKILL.md) | torch, keras, neural networks |17| [r-ml-timeseries](r-ml-timeseries/SKILL.md) | prophet, fable, forecast |18| [r-ml-survival](r-ml-survival/SKILL.md) | survival, survminer |19| [r-ml-anomaly](r-ml-anomaly/SKILL.md) | AnomalyDetection, anomalize |2021Machine learning and predictive modeling in R.2223## ML Frameworks2425| Package | Description |26|---------|-------------|27| **caret** ★ | Classification and Regression Training |28| **mlr3** ★ | Next-gen extensible ML framework |29| **tidymodels** ★ | Tidyverse-friendly modeling |30| **h2o** | Deep learning, RF, GBM, GLM |3132## Gradient Boosting3334| Package | Description |35|---------|-------------|36| **xgboost** ★ | eXtreme Gradient Boosting |37| **lightgbm** ★ | Light Gradient Boosting Machine |38| **gbm** | Generalized Boosted Regression |39| **bst** | Gradient Boosting |40| **mboost** | Model-Based Boosting |41| **CoxBoost** | Cox models boosting |42| **GAMBoost** | GAM boosting |43| **gamboostLSS** | GAMLSS boosting |44| **GMMBoost** | Mixed models boosting |4546## Tree-Based Methods4748| Package | Description |49|---------|-------------|50| **randomForest** | Breiman's random forests |51| **ranger** ★ | Fast random forests |52| **randomForestSRC** | RF for survival/regression/classification |53| **rpart** | Recursive partitioning trees |54| **party** | Recursive partitioning lab |55| **partykit** | Partitioning toolkit |56| **C50** | C5.0 Decision Trees |57| **Cubist** | Rule-based regression |58| **evtree** | Evolutionary trees |59| **tree** | Classification/regression trees |60| **bigrf** | Big Random Forests |6162## Regularization & Linear Models6364| Package | Description |65|---------|-------------|66| **glmnet** ★ | Lasso and elastic-net GLMs |67| **lars** | Least Angle Regression, Lasso |68| **elasticnet** | Elastic-Net, Sparse PCA |69| **penalized** | L1/L2 penalized estimation |70| **ncvreg** | SCAD/MCP regularization |71| **grplasso** | Group Lasso |72| **grpreg** | Grouped covariates regularization |73| **L0Learn** | Best subset selection |7475## Neural Networks & Deep Learning7677| Package | Description |78|---------|-------------|79| **torch** ★ | PyTorch-like tensors/NNs |80| **MXNet** | Flexible GPU deep learning |81| **nnet** | Feed-forward NNs |82| **RSNNS** | Stuttgart NN Simulator |83| **keras** | Keras interface |8485## Mixed Effects Models8687| Package | Description |88|---------|-------------|89| **lme4** ★ | Mixed-effects models |90| **nlme** | Mixed-effects with custom covariance |91| **glmmTMB** | Generalized mixed-effects |9293## Time Series & Forecasting9495| Package | Description |96|---------|-------------|97| **prophet** ★ | Facebook's forecasting tool |98| **fable** | Tidy forecasting |99| **forecast** | Time series forecasting |100101## Anomaly Detection102103| Package | Description |104|---------|-------------|105| **AnomalyDetection** | Twitter's anomaly detection |106| **anomalize** | Tidy anomaly detection |107| **BreakoutDetection** | Twitter's breakout detection |108| **CausalImpact** | Google's causal inference |109110## SVM & Kernel Methods111112| Package | Description |113|---------|-------------|114| **kernlab** | Kernel-based ML lab |115| **e1071** | SVM, Naive Bayes, etc. |116| **LiblineaR** | Linear predictive models |117| **svmpath** | SVM path algorithm |118| **penalizedSVM** | Feature selection SVM |119120## Clustering & Dimensionality121122| Package | Description |123|---------|-------------|124| **kohonen** | Self-Organizing Maps |125| **Rsomoclu** | Parallel SOM |126| **hda** | Heteroscedastic Discriminant Analysis |127| **klaR** | Classification and visualization |128129## Feature Selection130131| Package | Description |132|---------|-------------|133| **Boruta** | All-relevant feature selection |134| **FSelector** | Subset-search/ranking selection |135| **varSelRF** | Variable selection with RF |136137## Survival Analysis138139| Package | Description |140|---------|-------------|141| **survival** ★ | Survival analysis |142| **survminer** | Survival visualization |143| **ahaz** | Additive hazards regression |144145## Other146147| Package | Description |148|---------|-------------|149| **arules** | Association rules mining |150| **rattle** | GUI for data mining |151| **rminer** | Simplified NN/SVM usage |152| **ROCR** | Classifier performance visualization |153| **SuperLearner** | Ensemble learning |154| **RWeka** | Weka interface |155156## Quick Examples157158```r159# tidymodels workflow160library(tidymodels)161split <- initial_split(df, prop = 0.8)162train <- training(split)163test <- testing(split)164165model <- rand_forest(trees = 100) %>%166 set_engine("ranger") %>%167 set_mode("classification")168169recipe <- recipe(target ~ ., data = train) %>%170 step_normalize(all_numeric())171172workflow <- workflow() %>%173 add_model(model) %>%174 add_recipe(recipe)175176fit <- workflow %>% fit(data = train)177predict(fit, test)178179# xgboost180library(xgboost)181dtrain <- xgb.DMatrix(data = as.matrix(train_x), label = train_y)182model <- xgb.train(183 params = list(objective = "binary:logistic", max_depth = 6),184 data = dtrain, nrounds = 100185)186187# caret188library(caret)189ctrl <- trainControl(method = "cv", number = 5)190model <- train(target ~ ., data = train, method = "rf", trControl = ctrl)191```192193## Resources194195- tidymodels: https://www.tidymodels.org/196- caret: https://topepo.github.io/caret/197- xgboost: https://xgboost.readthedocs.io/198- mlr3: https://mlr3.mlr-org.com/199200---201> Source: [LeoLin990405/r-analytics-skill](https://github.com/LeoLin990405/r-analytics-skill) — distributed by [TomeVault](https://tomevault.io).202<!-- tomevault:4.0:skill_md:2026-06-16 -->