Getting ready

Now that we know how to create neural networks and work with layers, we will apply this methodology with the aim of predicting the birth weight in the low birth weight dataset. We'll create a neural network with three hidden layers. The low birth weight dataset includes the actual birth weight and an indicator variable for whether the birth weight is above or below 2,500 grams. In this example, we'll make the target the actual birth weight (regression) and then see what the accuracy is on the classification at the end. At the end, our model should be able to identify whether the birth weight will be <2,500 grams.

Get TensorFlow Machine Learning Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.