Prediction-based anomaly detection