Skip to content
Snippets Groups Projects
Commit 5465f150 authored by Michael Mutote's avatar Michael Mutote
Browse files

22202956 - optimised training supervised training

parent 6d774326
No related branches found
No related tags found
No related merge requests found
......@@ -2,10 +2,10 @@ import numpy as np
import Training_data
rng = np.random.default_rng(123)
TEACHDATA = 10000
TESTDATA = 1000
TEACHDATA = 1000
TESTDATA = 100
# ETA = 0.5
T_NUMBER = 1 # Number to be detected 0-6
T_NUMBER = 3 # Number to be detected 0-6
def sigmoid(val):
......@@ -36,7 +36,7 @@ class Neuron:
for number in range(len(Neuron.test_data)):
for sample in Neuron.test_data[number]:
ix = np.insert(sample.ravel(), 0, 1)
res[number] = res[number] + (self.activation(ix.dot(self.weights)))
res[number] = res[number] + abs(self.activation(ix.dot(self.weights)))
return res
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment