Anomaly Detection for High-Dimensional Data Using Large Deviations Principle