Chapter 8 Measuring Performance
To compare different models, we need a way to measure model performance. There are various metrics to use. To better understand the strengths and weaknesses of a model, you need to look at it through multiple metrics. In this chapter, we will introduce some of the most common performance measurement metrics.
Load the R packages first:
# install packages from CRAN
<- c('caret', 'dplyr', 'randomForest',
p_needed 'readr', 'car', 'pROC', 'fmsb', 'caret')
<- rownames(installed.packages())
packages <- p_needed[!(p_needed %in% packages)]
p_to_install
if (length(p_to_install) > 0) {
install.packages(p_to_install)
}
lapply(p_needed, require, character.only = TRUE)