Normalize input

Left: need to be careful about the learning rate, or else will oscillate around the optimal point

Right: normalized data can use bigger learning rate and learn faster

Two steps:

Zero center:

  1. subtract mean: all features around 0

  2. normalize variable: make it round (variance around 1)

Use the same parameter (Āµ and Ļƒ) for both train and test

x = np.mean(x, axis = 0)

Last updated