Detecting anomalies
As described in the previous chapter, anomaly detection methods are used to detect outliers, novelty, and anomalies in datasets that don’t conform to the dominant patterns in the data. To do this, in general, we need to detect the dominant pattern during training. This can be done both supervised and unsupervised, depending on whether we have labeled data. Therefore, anomaly detection methods are often extensions of conventional supervised or unsupervised learning methods. In the case of supervised learning, multiple variants of anomaly detection methods are based on supervised classification models:
- Methods where anomalies belong to the minority class: Here, we can use conventional supervised learning methods, with additional methods being used to tackle the problem with unbalanced data, for example by undersampling the majority class or oversampling the minority class.
- Methods where anomalies don’t conform to existing classes present...