Exemplo n.º 1
0
        static PerceptronTrainer()
        {
            andTraingData = new List <TrainObject>(10);
            TrainObject t1 = new TrainObject(new double[] { 0, 0 }, 0);
            TrainObject t2 = new TrainObject(new double[] { 0, 1 }, 0);
            TrainObject t3 = new TrainObject(new double[] { 1, 0 }, 0);
            TrainObject t4 = new TrainObject(new double[] { 1, 1 }, 1);

            andTraingData.Add(t1);
            andTraingData.Add(t2);
            andTraingData.Add(t3);
            andTraingData.Add(t4);
        }
Exemplo n.º 2
0
 public double Train(TrainObject to)
 {
     return(Train(to.Input, to.Solution));
 }