Question: In the Python file, you will be creating a neural network to predict the price of a stock. Part of the program is already implemented,
In the Python file, you will be creating a neural network to predict the price of a stock. Part of the program is already implemented, your goal is to set up the model, train the model on the training data set, then finally predict the values from the testing data set.
These are the following details you need to implement:
You should create a Sequential model with layers.
Your model should use LSTM layers, and after each use a Dropout layer with a rate of The first LSTM layer should have inputshape as a parameter along with units set to The final layer should be a Dense layer with units set to
Once the model is set up you should compile it with a meansquarederror loss and the optimizer set to adam
When you fit the training dataset, make sure to set the following values: epochs batch size verbose
Finally, you should run the predict function on the xtest dataset and print the last column of the array along with the model
summary.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
