We study the problem of rare event prediction for a class of slow-fast nonlinear dynamical systems. The state of the system of interest is described by a slow process, whereas a faster process drives its evolution. By taking advantage of recent advances in machine learning, we present a data-driven method to predict the future evolution of the state. We show that our method is capable of predicting a rare event at least several time steps in advance. We demonstrate our method using numerical experiments on two examples and discuss the mathematical and broader implications of our results.