top of page

Python Deep Learning Guided Project- LSTM Stock Prediction part 4, Tensorflow Functional, Lvl6 46min

Updated: Aug 21, 2023


free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
TensorFlow Functional API Deep Learning Model


Continuing our LSTM stock prediction Python guided deep learning project. In our part 4 part of our Tensorflow Stock prediction project, we start with the functional API in Tensorflow. The functional API will allow us to ingest 3 different sources of data and extract higher-level features from each dataset before combining it with the next channel inside your neural network.


We set up the workflow to allow for experiments and for you to further refine the architecture. In our model factory user defined function with will easily be able to build many different architectures.










Follow Data Science Teacher Brandyn



dataGroups:














free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
exploring null values in heatmap to understand when they happen


free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
Fill forward economic data and google trends data


free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
Dropped or fill forward null values

As is common when working with real Data set there are some extra issues created when joining different dataset. Truthfully it's quite tedious. Here we need to fill forward with pandas .ffill()

but not on the stock prices because the nulls are created from the google trends data being released on a Saturday. So although time is often used to join external datasets it can be tricky to join correctly.



free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
Create your input and outputs, the X and y

With the functional API in Tensorflow instead of X and y it is common to use input and output because you would have many X's and or many y's. For this reason, it's easier to think in terms of input and output.



free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
create model experiments function


free, Instruct, instructional, instructional education,free python learn, seaborn, python, project, data analysis project, pandas, analyze, Tensorflow, architecture, neural network, deep learning
TensorFlow Functional Deep Learning Model training History

In our LSTM stock market prediction we are achieving an RSquared of .17. Certainly better but far from great. RSquared can be thought of as the variation in our target that we are able to explain. We are showing some predictiveness now and in the next project we will see if we can do better.




919 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page