Anomaly detection technique for sequential data