import numpy as np
import matplotlib.pyplot as plt
class DN(object);
def(sele,th1,th2,th3,th0):
self.th1=th1
self.th2=th2
self.th3=th3:
self.th0=th0
import numpy as np
import matplotlib.pyplot as plt
print(w11.share)
th1 = np.random.random(6,5)
th2 = np.random.random(6,5)
th3 = np.random.random(6,1)
th0 = np.array([th2, th3])
a = 0.0000001
x = np.array([[2104, 3], [1600, 3], [2400, 3], [1416, 2], [3000, 4]])
t = np.array([400, 330, 369, 232, 540])
eps = 1e-4
e0 = 99
e1 = 99
e2 = 99
i = 0
while e0 >= eps or e1 >= eps or e2 >= eps:
e0 = (np.sum((x[i, 0:1] * th0[i])) + th1 * 1 - t[i])
e1 = e0 * x[i, 0]
e2 = e0 * x[i, 1]
th1 = th1 - a * e0
th2 = th2 - a * e1
th3 = th3 - a * e2
i +=1