We proceed with the recipe as follows:
- We start by loading the libraries, including the request library, because we will access the low birth weight data through a hyperlink. We also initiate a session:
import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import requests from sklearn import datasets from sklearn.preprocessing import normalize from tensorflow.python.framework import ops ops.reset_default_graph() sess = tf.Session()
- Next, we load the data through the request module and specify which features we want to use. We have to be specific because one feature is the actual birth weight and we don't want to use this to predict whether the birth weight is greater or less than a specific amount. ...