# sse

Sum squared error performance function

## Syntax

```perf = sse(net,t,y,ew) [...] = sse(...,'regularization',regularization) [...] = sse(...,'normalization',normalization) [...] = sse(...,FP) ```

## Description

`sse` is a network performance function. It measures performance according to the sum of squared errors.

`perf = sse(net,t,y,ew)` takes these input arguments and optional function parameters,

 `net` Neural network `t` Matrix or cell array of target vectors `y` Matrix or cell array of output vectors `ew` Error weights (default = `{1}`)

and returns the sum squared error.

This function has two optional function parameters which can be defined with parameter name/pair arguments, or as a structure `FP` argument with fields having the parameter name and assigned the parameter values.

`[...] = sse(...,'regularization',regularization)`

`[...] = sse(...,'normalization',normalization)`

`[...] = sse(...,FP)`

• `regularization` — can be set to any value between the default of 0 and 1. The greater the regularization value, the more squared weights and biases are taken into account in the performance calculation.

• `normalization`

• `'none'` — performs no normalization, the default.

• `'standard'` — normalizes outputs and targets to ```[-1, +1]```, and therefore normalizes errors to `[-2, +2]`.

• `'percent'` — normalizes outputs and targets to `[-0.5, +0.5]`, and therefore normalizes errors to ```[-1, +1]```.

## Examples

Here a network is trained to fit a simple data set and its performance calculated

```[x,t] = simplefit_dataset; net = fitnet(10); net.performFcn = 'sse'; net = train(net,x,t) y = net(x) e = t-y perf = sse(net,t,y) ```

## Network Use

To prepare a custom network to be trained with `sse`, set `net.performFcn` to `'sse'`. This automatically sets `net.performParam` to the default function parameters.

Then calling `train`, `adapt` or `perform` will result in `sse` being used to calculate performance.

Introduced before R2006a