Using machine learning and predictive analytics to combat cyber threats