Follow in this free-to-use Python TensorFlow guided project and build a deep learning model with the functional API in TensorFlow. Over the sequential model, the functional model in TensorFlow allows you to have multiple inputs and multiple outputs. This gives us a powerful technique in our deep learning architecture and is necessary for more advanced deep learning architectures.
Here we will use the functional API in TensorFlow to see if we can get a better accuracy score on the Kaggle competitions for the Titanic Dataset, a common data science project. The Titanic Classification Data is one of the first projects that most will use in the data science journey.
This is a fairly easy dataset and most students ignore the name and ticket columns as with classical machine learning there isn't much we can do with easily. However, with TensorFlow, we can use a Convolutional 1D layer to reduce it down to small groups of characters, and if there is a pattern with either the name or the ticket that will help our final predictions.
As this is a Kaggle competition we will be doing our best to take in all the available data for our predictions. Using the Input layer with the functional API in Keras. We will first preprocess the tabular and the text data separately and then combine them inside the neural network with the concatenation layer to then make our final prediction with the features that were extracted by our model. Each text input will first have a convolution then LSTM layer. The other two channels will take in the regular tabular data and in one channel dense fully connected layers will extract higher-level features and on the other side use an LSTM layer to do the same benefiting from the maths of each type of layer.
Follow Data Science Teacher Brandyn
dataGroups:
Commentaires