public ComputeError ( double inputs, double outputs ) : double | ||
inputs | double | The input values. |
outputs | double | The corresponding output values. |
return | double |
public double ComputeError(double[][] inputs, double[][] outputs)
{
double error = 0;
for (int i = 0; i < inputs.Length; i++)
{
double[] output = network.Compute(inputs[i]);
for (int j = 0; j < inputs[i].Length; j++)
{
double e = output[j] - outputs[i][j];
error += e * e;
}
}
return error;
}