Neural Network Toolbox Previous page   Next Page
mse

Mean squared error performance function

Syntax

perf = mse(E,X,PP)

perf = mse(E,net,PP)

info = mse(code)

Description

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,

and returns the mean squared error.

mse(E,net,PP) can take an alternate argument to X,

mse(code) returns useful information for each code string:

Examples

Here a two-layer feed-forward network is created with a 1-element input ranging from -10 to 10, four hidden tansig neurons, and one purelin output neuron.

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.

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 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.

See Also

msereg, mae, dmse


Previous page  minmax msereg Next page

© 1994-2005 The MathWorks, Inc.