xiaohongwu / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Network validation #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice if the framework could provide a built-in way to validade 
neural networks based on a validation set. The sample code provided below 
may be useful to accomplish this task:

//AForge.Neuro, in class BackpropagationLearning.cs:

<code> 
        public double MeasureError(double[] input, double[] output) 
        { 
            // compute the network's output 
            network.Compute(input); 

            // calculate network error 
            double error = CalculateError(output); 

            return error; 
        } 

        public double MeasureError(double[][] input, double[][] output) 
        { 
            double error = 0.0; 

            for (int i = 0; i < input.Length; ++i) 
            { 
                error += MeasureError(input[i], output[i]); 
            } 

            return error; 
        } 
</code>

Original issue reported on code.google.com by cesarso...@gmail.com on 5 Nov 2007 at 10:04

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 6 Nov 2007 at 4:16

GoogleCodeExporter commented 8 years ago

Original comment by andrew.k...@gmail.com on 1 Mar 2010 at 10:26