In this section, we will efficiently train our first predictive model for this example and build the corresponding confusion matrix. Most of the functionality comes from the excellent caret package. You can find more information on the vast features within this package that we will not explore in this book in its documentation (http://topepo.github.io/caret/index.html).
Training models with cross validation
Training our first predictive model
Following best practices, we will use Cross Validation (CV) as the basis of our modeling process. Using CV we can create estimates of how well our model will do with unseen data. CV is powerful, but the downside is that it requires more processing and therefore more time. If you can take...