Anomaly detection for cyber security via machine learning