Neural Network Toolbox | Search  Help Desk |
mse | Examples See Also |
Mean squared error performance function
perf = mse(e,x,pp)
perf = mse(e,net,pp)
info = mse(code)
mse
is a network performance function. It measures the network's performance according to the mean of squared errors.
mse(E,X,PP)
takes from one to three arguments,
E -
Matrix or cell array of error vector(s).
X -
Vector of all weight and bias values (ignored).
PP -
Performance parameters (ignored).
mse(E,net,PP)
can take an alternate argument to X
,
net -
Neural network from which X
can be obtained (ignored).
mse
(code
) returns useful information for each code
string:
'deriv
' - Name of derivative function.
'pnames
' - Names of training parameters.
'pdefaults
' - Default training parameters.
tansig
neurons, and one purelin output neuron.
net = newff([-10 10],[4 1],{'tansig','purelin'});Here the network is given a batch of inputs
P
. The error is calculated by subtracting the output A
from target T
. Then the mean squared error is calculated.
p = [-10 -5 0 5 10]; t = [0 0 1 1 1]; y = sim(net,p) e = t-y perf = mse(e)Note that
mse
can be called with only one argument because the other arguments are ignored. mse
supports those ignored arguments to conform to the standard performance function argument list.
You can create a standard network that uses mse
with newff, newcf
, or newelm
.
To prepare a custom network to be trained with mse,
set net.performFcn
to 'mse'. This will automatically set net.performParam
to the empty matrix []
, as mse
has no performance parameters.
In either case, calling train
or adapt
will result in mse
being used to calculate performance.
See newff
or newcf
for examples.
msereg
,
mae
,
dmse