Neural Network Toolbox Previous page   Next Page
msereg

Mean squared error with regularization performance function

Syntax

perf = msereg(E,X,PP)

perf = msereg(E,net,PP)

info = msereg(code)

Description

msereg is a network performance function. It measures network performance as the weight sum of two factors: the mean squared error and the mean squared weight and bias values.

msereg(E,X,PP) takes from three arguments,

where PP defines one performance parameters,

and returns the sum of mean squared errors (times PP.ratio) with the mean squared weight and bias values (times 1--PP.ratio).

The errors E can be given in cell array form,

or as a matrix,

where

msereg(E,net) takes an alternate argument to X and PP,

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

Examples

Here a two-layer feed-forward is created with a one-element input ranging from -2 to 2, 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 using a ratio of 20/(20+1). (Errors are 20 times as important as weight and bias values).

Network Use

You can create a standard network that uses msereg with newff, newcf, or newelm.

To prepare a custom network to be trained with msereg, set net.performFcn to 'msereg'. This will automatically set net.performParam to msereg's default performance parameters.

In either case, calling train or adapt will result in msereg being used to calculate performance.

See newff or newcf for examples.

See Also

mse, mae, dmsereg


Previous page  mse negdist Next page

© 1994-2005 The MathWorks, Inc.