Hi all. I am at week 3 programming assignment of Supervised Machine learning regression and classification and need assistance as it requires minimum of 80% to pass the course. However, i am stuck at 66% and unable to understand what was wrongly done for Q3 and Q6. Can anyone please help? Lab ID: qseajjfjtule. Can anyone please correct me what is wrongly done in below image?
Please post a copy of the error message or assert that you see when you run the notebook tests. (Not the grader - what do you get when you run all of the cells in the notebook?)
I am having exactly same issue for same assignment.
Code Cell UNQ_C1: Function 'sigmoid' is correct.
Code Cell UNQ_C2: Function 'compute_cost' is correct.
Code Cell UNQ_C3: Function 'compute_gradient' is correct.
Code Cell UNQ_C4: Function 'predict' is correct.
Code Cell UNQ_C5: Function 'compute_cost_reg' is incorrect. Check implementation.
Code Cell UNQ_C6: Function 'compute_gradient_reg' is incorrect. Check implementation.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
… all except for the tests that the grader uses. The grader uses different test than the notebook. Passing the notebook’s tests does not prove your code is perfect.
Check for issues like use of global variables, or hard-coded index values. Those are the most common mistakes.
The first step is for your code to pass all of the tests in the notebook. If you have a specific error message, you can post it here and we can discuss it.
Ok, I found the problem , Issue is not with my code but the submission requires filename to be same as given. I created a copy out of it and renamed it , so that I do not loose text in my original. I was expecting running notebook to be submitted as final submission. But it was submitting one from disk which was incomplete.
That’s a bummer, if I am allowed to create new notebooks, I would expect be able to submit any of the notebook as my submission.
This is the exact same issue I have been dealing with for the last two weeks. I have been working over 12 hours on this lab and all answers are correct but still get error message on the same exact sections. There is no place in the code I am supposed to be writing that addresses the topic of global variables or hard-coded index values. Have entered over ten variations on the code including the EXACT code Coursera hints at.
IMO - instead of using the nested for loops given in the notebook, you could do everything in one line using the following functions: np.dot, np.sum, np.log and functions we have defined already (sigmoid and the compute_gradient).
But I think for a better understanding of how parameters are updated iteratively we see the nested for loops.
I’m needing help for the week 3 Coding assignment of the Supervise Machine Learning course on Coursera.
I have these 2 which I can’t seem to get right.
Code Cell UNQ_C4: Function ‘predict’ is incorrect. Check implementation.
Code Cell UNQ_C6: Function ‘compute_gradient_reg’ is incorrect. Check implementation.
When I run it in the lab, it passes the checks and resulting values seem to match the expected output provided.
I’ve checked and re-checked the code, but can’t figure out what’s wrong.
I’ve run out of ideas so was hoping to get hints or tips from here.
I’m still at a loss to be honest. AFAIK: the assignment is to fill in the code within the # start code here # and # end code #. I shouldn’t be touching the variables defined outside this block?
What exactly do you mean by global variables? from my understanding, a section like # UNQ_C6 is pulling values from a previously defined function earlier in the assignment, so those variables are shared?
nvm, I kept adjusting my code and kept getting the same result everytime, but I realized I was working on a different file and the Jupyter was submitting a different file from the one I was fixing. Lol.