Anomaly detection with machine learning