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
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.
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.
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.