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
Original issue reported on code.google.com by
cesarso...@gmail.com
on 5 Nov 2007 at 10:04