Learning from sequential data for anomaly detection