Stock price prediction using LSTM (Long Short-Term Memory)

#artificialintelligence 

Convert the Xtrain and Ytrain data set into NumPy array because it will take for training the LSTM model.LSTM model has a 3-Dimensional data set [number of samples, time steps, features]. Therefore, we need to reshape the data from 2-Dimensional to 3-Dimensional. Below the code, snapshot illustrates a clear idea about reshaping the data set.Create the LSTM model which has two LSTM layers that contain fifty neurons also it has 2 Dense layers that one layer contains twenty-five neurons and the other has one neuron. In order to create a model that sequential input of the LSTM model which creates by using Keras library on DNN (Deep Neural Network). The compile LSTM model is using MSE (Mean Squared Error) for loss function and the optimizer to be the "adam".