In the preceding recipes, we have noted that the number of parameters we are fitting far exceeds the equivalent linear models. In this recipe, we will attempt to improve our logistic model of low birth weight by using a neural network.
Improving the predictions of linear models
Getting ready
For this recipe, we will load the low birth weight data and use a neural network with two hidden fully-connected layers with sigmoid activations to fit the probability of a low birth weight.
How to do it
We proceed with the recipe as follows:
- We start by loading the libraries and...