Evaluating outlier detection with the Evaluate API
In the previous section, we touched on the fact it can be hard for a user to know how to set the threshold for outlier scores in order to group the data points in the dataset into normal and outlier categories. In this section, we will show how to approach this issue if you have a labeled dataset that contains, for each point, the ground truth values that record whether the point is an outlier. Before we dive into the practical demonstration, let's take a moment to understand some key performance metrics that are used in evaluating the performance of the outlier detection algorithm.
One of the simplest ways we can measure the performance of the algorithm is to compute the number of data points that it correctly predicted as outliers; in other words, the number of true positives (TPs). In addition, we also want to know the number of true negatives (TNs): how many normal data points were correctly predicted as normal. By extension...