ultima modifica di oggi, le formule del costo, del gradiente dovrebbero essere giuste
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import math
|
||||
import random
|
||||
|
||||
class Percettrone:
|
||||
def __init__(self, w1 = 1, w2 = 1, bias = 1, lre = 0.2):
|
||||
def __init__(self, w1 = random.uniform(-1, 1), w2 = random.uniform(-1, 1), bias = random.uniform(-1, 1), lre = 0.2):
|
||||
self.w1 = w1
|
||||
self.w2 = w2
|
||||
self.bias = bias
|
||||
|
||||
Reference in New Issue
Block a user