Neural Network Toolbox | ![]() ![]() |
Mean squared error with regularization or performance derivative function
Syntax
dPerf_dE = dmsereg('e',E,X,perf,PP)
dPerf_dX = dmsereg('x',E,X,perf,PP)
Description
dmsereg
is the derivative function for msereg
.
dmsereg('d',E,X,perf,PP)
takes these arguments,
E -
Matrix or cell array of error vector(s).
X -
Vector of all weight and bias values.
perf -
Network performance (ignored).
PP
- mse
performance parameter.
where PP
defines one performance parameters,
PP.ratio -
Relative importance of errors vs. weight and bias values.
and returns the derivative dPerf/dE
.
dmsereg('x',E,X,perf)
returns the derivative dPerf/dX
.
mse
has only one performance parameter.
Examples
Here we define an error E
and X
for a network with one 3-element output and six weight and bias values.
E = {[1; -2; 0.5]}; X = [0; 0.2; -2.2; 4.1; 0.1; -0.2];
Here the ratio performance parameter is defined so that squared errors are 5 times as important as squared weight and bias values.
pp.ratio = 5/(5+1);
Here we calculate the network's performance, and derivatives of performance.
perf = msereg(E,X,pp) dPerf_dE = dmsereg('e',E,X,perf,pp) dPerf_dX = dmsereg('x',E,X,perf,pp)
See Also
![]() | dmse | dnetprod | ![]() |