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

Mean squared error with regularization performance function

Syntax

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,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
FP.ratio
Ratio of importance between errors and weights

and returns the mean squared error plus FP.ratio times the mean squared weights.

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

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

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

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

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

Examples

Here a two-layer feed-forward network is created with a one-element input ranging from -2 to 2, 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 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 automatically sets net.performParam to msereg's default performance parameters.

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

See newff or newcf for examples.

See Also

mse, mae


 Provide feedback about this page 

Previous page mse mseregec Next page

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