octave snippets normalize
Last active
April 11, 2018 05:45
-
-
Save BadUncleX/918fd730dc329032df3c to your computer and use it in GitHub Desktop.
octave snippets normalize | 数据预处理
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X_norm = X; | |
indicies = 1:size(X, 2); | |
mu = mean(X) | |
sigma = std(X) | |
for i = indicies, | |
XminusMu = X(:, i) - mu(i); | |
X_norm(:, i) = XminusMu / sigma(i); | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment