Neural Network Toolbox
  Go to function:
    Search    Help Desk 
msereg    Examples   See Also

Mean squared error w/reg performance function

Syntax

perf = mse(e,x,pp)

perf = mse(e,net,pp)

info = mse(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

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

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

Examples

Here a two layer feed-forward is created with a 1-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 | Help Desk | Next ]