Anomaly detection main scripts