Accord.Neuro.Learning.DeepNeuralNetworkLearning.ComputeError C# (CSharp) Method

ComputeError() public method

Computes the reconstruction error for a given set of input values.
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;
        }