diff --git a/Reinforcement_Learning/Perceptrons.py b/Reinforcement_Learning/Perceptrons.py index 30a297463d8a8eae59120cd81d6ba190322d67f2..a1ad48e6409a47e19c823763d29d9915aed7108b 100644 --- a/Reinforcement_Learning/Perceptrons.py +++ b/Reinforcement_Learning/Perceptrons.py @@ -2,7 +2,7 @@ import numpy as np import Training_data rng = np.random.default_rng(123) -TEACHDATA = 100000 +TEACHDATA = 10000 TESTDATA = 1000 # ETA = 0.5 T_NUMBER = 1 # Number to be detected 0-6 diff --git a/Reinforcement_Learning/Solution_Testing_1.py b/Reinforcement_Learning/Solution_Testing_1.py index 1153878984efc74e3b346d96ee2f21d743c23ae2..0b07b7c27fc52d2ad4b21a5db9f66d933c7c24cb 100644 --- a/Reinforcement_Learning/Solution_Testing_1.py +++ b/Reinforcement_Learning/Solution_Testing_1.py @@ -1,7 +1,6 @@ import numpy as np import Perceptrons -import PerceptronsSGD def test_function(ETA, p): @@ -18,13 +17,13 @@ for ETA in ([0.05, 0.1, 0.2, 0.4, 0.75, 1, 2, 5]): # the list of values for ETA x.train(ETA/200) y = Perceptrons.SGDPerceptron(20) y.train(ETA) - for i in range(10): + for i in range(1): res = test_function(ETA, w) print("Thres", res) # print the results list - for i in range(10): + for i in range(1): res = test_function(ETA/200, x) print("Lin", res) # print the results list - for i in range(10): + for i in range(1): res = test_function(ETA, y) print("sgd", res) # print the results list print("\n\n")