Neural Network Toolbox™ Previous page   Next Page 
mse
 Provide feedback about this page

Mean squared error performance function

Syntax

Description

mse is a network performance function. It measures the network's performance according to the mean of squared 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 squared error.

mse('dy',E,Y,X,perf,FP) returns the derivative of perf with respect to Y.

mse('dx',E,Y,X,perf,FP) returns the derivative of perf with respect to X.

mse('name') returns the name of this function.

mse('pnames') returns the names of the training parameters.

mse('pdefaults') returns the default function parameters.

Examples

Here a two-layer feed-forward network is created with a one-element input ranging from -10 to 10, four hidden tansig neurons, and one purelin output 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 squared error is calculated.

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.

Network Use

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 automatically sets net.performParam to the empty matrix [], because mse has no performance parameters.

In either case, calling train or adapt results in mse's being used to calculate performance.

See newff or newcf for examples.

See Also

msereg, mae


 Provide feedback about this page 

Previous page minmax msereg Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS