Introduction
Model evaluation is performed to ensure that a fitted model can accurately predict responses for future or unknown subjects. Without model evaluation, we might train models that over-fit in the training data. To prevent overfitting, we can employ packages, such as caret
, rminer
, and rocr
to evaluate the performance of the fitted model.
In the following chapter, we will discuss how one can implement a simple R script or use one of the packages (for example, caret
or rminer
) to evaluate the performance of a fitted model.
Why do models need to be evaluated?
Whenever we are building a model, it needs to be tested and evaluated to ensure that it will not only work on trained data, but also on unseen data and can generate results with accuracy. A model should not generate a random result though some noise is permitted. If the model is not evaluated properly then the chances are that the result produced with unseen data is not accurate. Furthermore, model evaluation can help select the...