| Neural Network Toolbox | |
| Provide feedback about this page |
Mean absolute error performance function
Syntax
perf = mae(E,Y,X,FP) dPerf_dy = mae('dy',E,Y,X,perf,FP) dPerf_dx = mae('dx',E,Y,X,perf,FP) info = mae(code)
Description
mae is a network performance function. It measures network performance as the mean of absolute errors.
mae(E,Y,X,FP) takes E and optional function parameters,
E |
Matrix or cell array of error vectors |
Y |
Matrix or cell array of output vectors (ignored) |
X |
Vector of all weight and bias values (ignored) |
FP |
Function parameters (ignored) |
and returns the mean absolute error.
mae('dy',E,Y,X,[perf,FP) returns the derivative of perf with respect to Y.
mae('dx',E,Y,X,perf,FP) returns the derivative of perf with respect to X.
mae('name') returns the name of this function.
mae('pnames') returns the names of the training parameters.
mae('pdefaults') returns the default function parameters.
Examples
Here a perceptron is created with a one-element input ranging from -10 to 10 and one neuron.
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.
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.
Network Use
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 automatically sets net.performParam to the empty matrix [], because mae has no performance parameters.
In either case, calling train or adapt results in mae's being used to calculate performance.
See newp for examples.
See Also
| Provide feedback about this page |
![]() | logsig | mandist | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |