In this chapter, we will start with some unlabeled data and we will need to spot the anomalous samples in it. We may be given inliers only, and we want to learn what normal data looks likefrom them. Then, after fitting a model on our inliers, we are given new data and need to spot any outliers that diverge from the data seen so far. These kinds of problems are referred to as novelty detection. On the other hand, if we fit our model on a dataset that consists of a combination of inliers and outliers, then this problem is referred to as an outlier detection problem.
Like any other unlabeled algorithm, the fit method ignores any labels given. This method's interface allows you to pass in both x and y, for the sake of consistency, but y is simply ignored. In cases of novelty detection, it is logical to firstuse thefitmethod on a dataset that includes no outliers, and then use the algorithm'spredictmethod later on for data that includes...