Training the neural network with time series data