deep-learning-with-python-notebooks
deep-learning-with-python-notebooks copied to clipboard
3.7 example z-score compute
mean = train_data.mean(axis=0) train_data -= mean std = train_data.std(axis=0) train_data /= std
test_data -= mean test_data /= std
modify
mean = train_data.mean(axis=0) std = train_data.std(axis=0) train_data -= mean train_data /= std
test_data -= mean test_data /= std
Think there's no needing in this. Maybe even operation std will be executed faster on data obtained by mean since std will be use zero subtract operation to find the mean.
V[X+c] = V[X], where c is a constant value