Neural Network Toolbox | Search  Help Desk |
prestd | Examples See Also |
Preprocess data so that its mean is 0 and the standard deviation is 1
[pn,meanp,stdp,tn,meant,stdt] =
prestd(p,t)
[pn,meanp,stdp] =
prestd(p)
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,
and returns,
pn - R
x Q
matrix of normalized input vectors.
meanp - R
x 1
vector containing standard deviations 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 standard deviations for each T.
stdt - S
x 1
vector containing standard deviations for each T.
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,
[pn,meanp,stdp] = prestd(p);
pn = (p-meanp)/stdp;
premnmx
,
prepca