Esempio n. 1
0
 public void Create(SingleLayerPerceptron p)
 {
     for (int i = 0, length = this.inputs.GetLength(1); i < length; i++)
     {
         this.inputs[i, 0]  = SingleLayerPerceptron.rng.NextFloat(-11);
         this.inputs[i, 1]  = SingleLayerPerceptron.rng.NextFloat(-11);
         this.targets[i, 0] = p.IsAboveLine(new float[] { this.inputs[i, 0], this.inputs[i, 1] });
     }
 }