示例#1
0
 /// <summary>
 /// Induces the layer of this perceptron from the specified set of examples
 /// </summary>
 /// <param name="innds">a set of training examples for constructing the layer of this perceptron.</param>
 /// <param name="numberofEpochs">the number of training epochs to be used.</param>
 public void TrainOn(NeuralNetworkDataSet innds, int numberofEpochs)
 {
     for (int i = 0; i < numberofEpochs; ++i)
     {
         innds.RefreshDataset();
         while (innds.HasMoreExamples())
         {
             NeuralNetworkExample nne = innds.GetExampleAtRandom();
             ProcessInput(nne.GetInput());
             Vector error = layer.ErrorVectorFrom(nne.GetTarget());
             ProcessError(error);
         }
     }
 }