First page Back Continue Last page Overview Graphics

Neural Network with Bias, Part3

p = Perceptron(2)

for point, label in learnset:

p.adjust(label,

p(point),

point)

evaluation = Counter()

for point, label in learnset:

if p(point) == label:

evaluation["correct"] += 1

else:

evaluation["wrong"] += 1

print(evaluation.most_common())