ICP 12 - smqhw/kdm1 GitHub Wiki
A. Description About the ICP: This ICP leaned me the implementation of text data to train the model for text generation, RNN with including LSTM which is known for time series data.
B. Objective: The main objective of this ICP is to implement a LSTM time series and predicting the train model.
C. Design Implementation: First, I have imported all the libraries to build the model.
Next step is to split the data into training and test sets to avoid overfitting and to be able to investigate the generalization ability of our model. The target value to be predicted is going to be the close stock price value.
To normalize the data before model fitting. This will boost the performance. You can read more here for the Min-Max Scaler. We have now reshaped the data into the following format (#values, #time-steps, #1 dimensional output). Now, itโs time to build the model. We will build the LSTM with 50 neurons and 4 hidden layers. Finally, we will assign 1 neuron in the output layer for predicting the normalized stock price. We will use the MSE loss function and the Adam stochastic gradient descent optimizer.
Next reshaping the dataset for test data and predicting the values
visualizing the graph can clearly see that our model performed very good. It is able to accurately follow most of the unexcepted jumps/drops however, for the most recent date stamps, we can see that the model expected (predicted) lower values compared to the real values of the stock price.
D. Video Link: Submitted in Code file.
E. Conclusion:
What you have learned from the ICP - In this ICP, I have learned how to build a LSTM time series and predicting the values for dataset with RNN.
what challenges you have faced - I did not face any challenges while doing the ICP.