I am getting Assertionerror can anyone explain what is this and why I am getting this error?
Hi @Tayyab_Ali1
The assertionError is raised because dj_db is expected to be -2, but it is not. So you need to check how dj_db is calculated. Use the hints
The issue was resolved.
Thanks for your reply
START CODE HERE
for i in range(m):
f_wb = w * x[i] + b
dj_dw_i = (f_wb - y[i]) * x[i]
dj_db_i = f_wb - y[i]
dj_db += dj_db_i
dj_dw += dj_dw_i
dj_dw = dj_dw / m
dj_db = dj_db / m
### END CODE HERE ###
This is how dj_db is calculated. I still get the assertion error. Why?
Can you be specific?
Thanks,
RG
Found out what the problem was from another posting. Got it. Solved.
Thanks
RG
Can you link the post?