Hello,
I am doing exercise 3 of 2.5 Gradient for logistic regression and when I run my code, the following error message appears
local variable ‘z_wb_ij’ referenced before assignment
Could someone review my notebook and help out please ? @Girijesh maybe ? ![]()
Thank you
Dear @IreneVH,
Please send me your notebook to me. I’ll look into the issues.
{moderator edit: code removed}
Dear @Girijesh ,
Please find enclosed my notebook.
Many thanks in advance for your help,
Good evening.
I think I found the solution, I had to remove a + before the = to reference the variable
z_wb_ij = X[i,j]*w[j]
instead of
z_wb_ij += X[i,j]*w[j]
line 26.
However, I am now stuck with another problem at the next cell.
the selected output is wrong.
Please see enclosed.
Many thanks again
{moderator edit: code removed}
Hi again, I found again the solution
for j in range(n):
dj_dw[j] =
I had forgotten the [j]
Dear @IreneVH,
Please do not post/share code publicly on the community.
Send me personal message with all the lab files.
Dear @Girijesh , sorry I thought that I was sending you a personal message and not a public one. I managed to find the solutions myself in the end and I finished the class, thank you so much for all your help, I wish you a wonderful day.