Machine Learning for Early Warning