Generalized Anomaly Detection