Assessing a model
Evaluating a model is an essential part of the workflow. There is no point in creating the most sophisticated model if you do not have the tools to assess its quality. The validation process consists of defining some quantitative reliability criteria, setting a strategy such as a K-fold cross-validation scheme, and selecting the appropriate labeled data.
The purpose of this section is to create a reusable Scala class to validate models. For starters, the validation process relies on a set of metrics to quantify the fitness of a model generated through training.
Key quality metrics
Let's consider a simple classification model with two classes defined as positive (with respect to negative) represented with Black (with respect ...