A Privacy Preserving Approach to Anomaly Detection