Machine Learning-based Anomaly Detection with Magnetic Data