The caret package has become the de facto package for dealing with regression and classification models in R, especially between machine learning practitioners. It is essentially a wrapper for many predictive modeling packages, providing a unified approach to deploying models, preprocessing data, tuning hyperparameters, and making feature selection. From a practical perspective, it really easy to switch between models while using the same functions.
It is very important to stress that some statistical and machine learning models have parameters and hyperparameters. The parameters are trained by whichever algorithm we use, and the hyperparameters need to be defined by the user. Hyperparameters essentially control how much overfitting or underfitting we have and they need to be tuned appropriately. There are essentially two ways of determining them:
- Splitting the...