Perceptron: Difference between revisions

m
(Added lua implementation)
m (→‎{{header|Lua}}: fixed typo)
Line 441:
end
node:train(trainingData, 100, .1) --trains on the set for 100 epochs with a step size of 0.1
print("Trained\nTrained results:")
for i = -2, 2, 1 do
print(i..":", node:test({i}))
Line 453:
1: 1.6849672607805
2: 2.4325140849699
 
Trained results:
-2: -3