hi i have a problem with the compute_gradient() function in my code it seems correct but i can’t have the test values correct for dj_dw
{moderator edit: code removed}
hi i have a problem with the compute_gradient() function in my code it seems correct but i can’t have the test values correct for dj_dw
{moderator edit: code removed}
What you have done is replacing the value stored in dj_dw[j] with dj_dw_ij, and not adding dj_dw_ij to dj_dw_ij to get the cumulative value as the loop going round each feature. That is where the problem lies.
problem solved. Thanks !
@Sontia_Emerson_Tatan, I’m glad you solved the problem.
In the future, please do not post your code on the forum. That’s not allowed by the course guidelines.
I have edited this thread to remove the code.
If a mentor needs to see your code, we’ll ask you to send it via a private message.
You can post any error messages and the assert stack (a screen capture image is the best method). Do not post your code itself.
Thanks!
Hi, I am new to Machine Learning. Have stuck on the similar assertion error and couldn’t figure out which part is wrong. Can anyone please help? Thanks in advance, Jing
Hi @Jing_Chen ,
Please post a fresh query with error trackback to help diagnose your problem. Similar assertion error does not necessary mean the same problem.
Hi Kic,
Will do. Thanks for the prompt response. Much appreciated.
Jing