| Neural Network Toolbox | Search  Help Desk |
| mae | Examples See Also |
Mean absolute error performance function
perf = mae(e,x,pp)
perf = mae(e,net,pp)
info = mae(code)
mae is a network performance function.
mae(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).
E can be given in cell array form,
E - Nt x TS cell array, each element E{i,ts} is a Vi x Q matrix or[].
E - (sum of Vi) x Q matrix
mae(E,net,PP) can take an alternate argument to X,
net - Neural network from which X can be obtained (ignored).
mae(code) returns useful information for each code string:
'deriv' - Name of derivative function.
'pnames' - Names of training parameters.
'pdefaults' - Default training parameters.
net = newp([-10 10],1);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 absolute error is calculated.
p = [-10 -5 0 5 10]; t = [0 0 1 1 1]; y = sim(net,p) e = t-y perf = mae(e)Note that
mae can be called with only one argument because the other arguments are ignored. mae supports those arguments to conform to the standard performance function argument list.
You can create a standard network that uses mae with newp.
To prepare a custom network to be trained with mae, set net.performFcn to 'mae'. This will automatically set net.performParam to the empty matrix [], as mae has no performance parameters.
In either case, calling train or adapt will result in mae being used to calculate performance.
See newp for examples.
mse, msereg, dmae