|
"xs_mat = (x_mat - np.mean(x_mat, axis=0)) / np.std(x_mat)\n", |
np.std(x_mat) should be np.std(x_mat, axis = 0)
The image of Figure 7.7 (b) is obvious wrong. The standard correlation of the variable represented by the horizontal axis is obviously not 1.