Performance metrics

While there are many different types of classification algorithms, evaluation metrics more or less shares similar principles. In a supervised classification problem, there exists a true output and a model-generated predicted output for each data point. For this reason, the results for each data point can be assigned to one of four categories:

  • True positive (TP): Label is positive and prediction is also positive.
  • True negative (TN): Label is negative and prediction is also negative.
  • False positive (FP): Label is negative but prediction is positive.
  • False negative (FN): Label is positive but prediction is negative.

Now, to get a clearer idea about these parameters, refer to the following figure:

Figure 23: Prediction ...

Get Scala and Spark for Big Data Analytics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.