def anomaly detection and LOF update