Neural Network Toolbox |
Transform data using a precalculated minimum and maximum value
Syntax
Description
tramnmx
transforms the network input set using minimum and maximum values that were previously computed by premnmx
. This function needs to be used when a network has been trained using data normalized by premnmx
. All subsequent inputs to the network need to be transformed using the same normalization.
tramnmx(P,minp, maxp)
takes these inputs
P
-- R
x Q
matrix of input (column) vectors.
minp
-- R
x 1
vector containing original minimums for each input.
maxp
-- R
x 1
vector containing original maximums for each input.
Examples
Here is the code to normalize a given data set, so that the inputs and targets will fall in the range [-1,1]
, using premnmx
, and also code to train a network with the normalized data.
p = [-10 -7.5 -5 -2.5 0 2.5 5 7.5 10]; t = [0 7.07 -10 -7.07 0 7.07 10 7.07 0]; [pn,minp,maxp,tn,mint,maxt] = premnmx(p,t); net = newff(minmax(pn),[5 1],{'tansig' 'purelin'},'trainlm'); net = train(net,pn,tn);
If we then receive new inputs to apply to the trained network, we will use tramnmx
to transform them first. Then the transformed inputs can be used to simulate the previously trained network. The network output must also be unnormalized using postmnmx
.
Algorithm
See Also
premnmx
,
prestd
,
prepca
,
trastd
,
trapca
trainscg | trapca |
© 1994-2005 The MathWorks, Inc.