Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BadUncleX/918fd730dc329032df3c to your computer and use it in GitHub Desktop.
Save BadUncleX/918fd730dc329032df3c to your computer and use it in GitHub Desktop.
octave snippets normalize | 数据预处理
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