There are two graded questions in this assignment.I dont know why my implementation doesnt work for Exercise 1.MY implementation is correct for Excercise 2 as well,I believe my code is correct for ex1 as well .
Am I allowed to share my problems here,like the code ?
It is more or less the same as the hints given.
I still Cant understand why it doesnt work.
Please don’t post your code on the Forum.
You can send me your code via a private message. I’ll review it.
Fine,Please Look into it.
I will be sharing it in some time.
The code works now.I rewrote it again and this time it is marked as correct.
thanks
Hi,
I’ve got a question about the graded assignment for week 2. How do I load a fresh original copy of the assignment. It appears I’ve messed up a few things and now I’m completely lost.
Hello @San1, welcome to our community, and please check out the item 09 in this link for instructions.
Hi Tmosh,
I need your help for the Week 2 practice lab: Linear regression, I finished my implemention of both functions and started grading, got issue for # UNQ_C1 compute_cost, but I tested it I get the expected result as shown in test code cell. so onlyfailed with grading got only 50% pass. I didnot see any issue with my code. how can I reach you for help?
error message:
Code Cell UNQ_C1: Unexpected error (IndexError(‘index 3 is out of bounds for axis 0 with size 3’)) occurred during function check. We expected function compute_cost
to return cost for perfect prediction must be 0. Please check that this function is defined properly.
### my test code return expected result and removed before submit for grading
initial_w = 2
initial_b = 1
cost = compute_cost(x_train, y_train, initial_w, initial_b)
print(type(cost))
print(f’Cost at initial w: {cost:.3f}')
result correct:
<class ‘numpy.float64’>
Cost at initial w: 75.203
Hi gent,
I just newly joined to learn Machine learning specialty. looks like the latest discussion is 3 years ago, I got grading issue but my function implemention can produce expected result, but got grading problem, not sure I can still get help from any mentor:
the error message on submitting for grading:
error message:
Code Cell UNQ_C1: Unexpected error (IndexError(‘index 3 is out of bounds for axis 0 with size 3’)) occurred during function check. We expected function compute_cost
to return cost for perfect prediction must be 0. Please check that this function is defined properly.
Much appreciated for support! Luke
I think you haven’t defined the function properly . Code in python requires indentation wherever necessary . please check the code once again
Thanks a lot, Harsh. the issue is resolved, Tom Mosher reviewed my code, the reason is the X_train, Y_train global variables are misapplied carelessly as parameters in the function.