⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dscale.m

📁 类神经网路─MATLAB的应用(范例程式)
💻 M
字号:
function [X,Xscale]=dscale(X)
% DSCALE
% ------
%         [X,Xscale]=dscale(X) scales data to zero mean and variance 1.
%
% INPUTS:
%      X      - Data matrix
%               (dimension is # of data vectors in matrix * # of data points)
%
% OUTPUTS:
%      X      - Scaled data matrix
%      Xscale - Matrix containing sample mean (column 1) and standard 
%               deviation (column 2) for each data vector in X.
%
% See the function 'wrescale' on how to rescale the weights of the
% trained network
%
% Programmed by Magnus Norgaard, IAU/IMM Technical University of Denmark
% LastEditDate: July 16, 1996

[r,N]  = size(X);              % r = # of data vectors, N = # of data
Xscale = [mean(X')' std(X')']; % Col. 1 contains mean values, col 2 the std's
for k=1:r,
  X(k,:) = (X(k,:) - Xscale(k,1))/Xscale(k,2);
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -