Applied Neural Networks with TensorFlow 2 by Orhan Gazi Yalçın

Applied Neural Networks with TensorFlow 2 by Orhan Gazi Yalçın

Author:Orhan Gazi Yalçın
Language: eng
Format: epub
ISBN: 9781484265130
Publisher: Apress


You can obtain the following output in Figure 6-7 by running train_stats.

Figure 6-7train_stats DataFrame for Train Set Statistics

Now that we have the mean and standard deviation values for training set features, it is time to normalize the train and test sets. The custom normalizer(x) function can be used for train, test, and new observation sets.# Feature scaling with the mean

# and std. dev. values in train_stats

def normalizer(x):

return (x-train_stats['mean'])/train_stats['std']

train_x_scaled = normalizer(train_x)

test_x_scaled = normalizer(test_x)



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.