Installation and use
Install many of the packages in the tidymodels ecosystem by running
library(tidymodels)to load the core packages and make them available in your current R session.
The core tidymodels packages work together to enable a wide variety of modeling approaches:
tidymodels is a meta-package that installs and load the core packages listed below that you need for modeling and machine learning.
rsample provides infrastructure for efficient data splitting and resampling.
parsnip is a tidy, unified interface to models that can be used to try a range of models without getting bogged down in the syntactical minutiae of the underlying packages.
recipes is a tidy interface to data pre-processing tools for feature engineering.
workflows bundle your pre-processing, modeling, and post-processing together.
tune helps you optimize the hyperparameters of your model and pre-processing steps.
yardstick measures the effectiveness of models using performance metrics.
broom converts the information in common statistical R objects into user-friendly, predictable formats.
dials creates and manages tuning parameters and parameter grids.
Learn more about the tidymodels metapackage itself at https://tidymodels.github.io/tidymodels/.
The tidymodels framework also includes many other packages designed for specialized data analysis and modeling tasks. They are not loaded automatically with
library(tidymodels), so you’ll need to load each one with its own call to
library(). These packages include:
infer is a high-level API for tidyverse-friendly statistical inference.
The corrr package has tidy interfaces for working with correlation matrices.
parsnip also has additional packages that contain more model definitions. discrim contains definitions for discriminant analysis models and rules does the same for rule-based classification and regression models.
There are several add-on packages for creating recipes. embed contains steps to create embeddings or projections of predictors. textrecipes has extra steps for text processing, and themis can help alleviate class imbalance using sampling methods.
probably has tools for post-processing class probability estimates.
The tidyposterior package enables users to make formal statistical comparisons between models using resampling and Bayesian methods.
Some R objects become inconveniently large when saved to disk. The butcher package can reduce the size of those objects by removing the sub-components.
To know whether the data that you are predicting are extrapolations from the training set, applicable can produce metrics the measure extrapolation.
- hardhat is a developer-focused package that helps beginners create high-quality R packages for modeling.