Using Machine Learning for Anomaly Detection