Complete the following exercises for some practice with the machine learning workflow and exposure to some additional anomaly detection strategies:
- A one-class SVM is another model that can be used for unsupervised outlier detection. Build a one-class SVM model with the default parameters, using a pipeline with the StandardScaler and the OneClassSVM. Train the model on January 2018 data, just as we did for the isolation forest. Make predictions on that same data. Count the number of inliers and outliers this model identifies.
- Using the 2018 minutely data, build a k-means model with two clusters after standardizing the data with the StandardScaler. With the labeled data in the attacks table in the SQLite database (logs/logs.db), see whether this model gets a good Fowlkes-Mallows score (use the fowlkes_mallows_score() function in sklearn.metrics).
- Evaluate the performance...