-2

The formula I am using to find the updated w and b parameters:

For w:
new w = w_current - learning rate * partial derivative with respect to w

For b: 
new b = b_current - learning rate * partial derivative with respect to b

From the picture I am calculating the partial derivatives with the variables tot_w and tot_b for each x and y, and storing the total in pd_w and pd_b.

2 Answers2

0

The interpreter is complaining that variable i is sued as function. In the tol_w statement, there’s probably missing a arithmetic operator between I and the parentheses.

0

Try using tot_w = -2*(i*(j-b_current..)).

Raghav Gupta
  • 454
  • 3
  • 12
  • 2
    Could you edit this to include some detail that might be useful for future readers? Why is this the solution? – halfer Sep 28 '20 at 18:46