Neural Network Toolbox |
Preprocess data so that its mean is 0 and the standard deviation is 1
Syntax
[pn,meanp,stdp,tn,meant,stdt] =
prestd(p,t)
Description
prestd preprocesses the network training set by normalizing the inputs and targets so that they have means of zero and standard deviations of 1.
prestd(p,t)
takes these inputs,
pn
-- R
x Q
matrix of normalized input vectors
meanp
-- R
x 1
vector containing mean for each P
stdp
-- R
x 1
vector containing standard deviations for each P
tn
-- S
x Q
matrix of normalized target vectors
meant
-- S
x 1
vector containing mean for each T
stdt
-- S
x 1
vector containing standard deviations for each T
Examples
Here is the code to normalize a given data set so that the inputs and targets will have means of zero and standard deviations of 1.
p = [-0.92 0.73 -0.47 0.74 0.29; -0.08 0.86 -0.67 -0.52 0.93]; t = [-0.08 3.4 -0.82 0.69 3.1]; [pn,meanp,stdp,tn,meant,stdt] = prestd(p,t);
If you just want to normalize the input,
Algorithm
See Also
prepca | purelin |
© 1994-2005 The MathWorks, Inc.