How to do it...

This section walks through the steps to normalize the height and weight.

  1. Slice the array into inputs and outputs using the following script:
X = data_array[:,:2]
y = data_array[:,2]
  1. The mean and the standard deviation can be calculated across the 29 individuals using the following script:
x_mean = X.mean(axis=0)
x_std = X.std(axis=0)

  1. Create a normalization function to normalize X using the following script:
 def normalize(X):
x_mean = X.mean(axis=0)
x_std = X.std(axis=0)
X = (X - X.mean(axis=0))/X.std(axis=0)
return X