Recurrent Neural Networks for Prediction: Learning Algorithms, Architectures and Stability