Hello,
I am struggling with the graded practice lab. I have followed the hints and the coding, but I am getting a 0% correct when I go to submit the lab. I look at the test code result, it is unclear where my issue is. Here is an example:
AssertionError Traceback (most recent call last)
in
9 # Public tests
10 from public_tests import *
—> 11 compute_cost_test(compute_cost)
~/work/public_tests.py in compute_cost_test(target)
17 initial_b = 1.0
18 cost = target(x, y, initial_w, initial_b)
—> 19 assert cost == 2, f"Case 2: Cost must be 2 but got {cost}"
20
21 # print(“Using X with shape (5, 1)”)
AssertionError: Case 2: Cost must be 2 but got 0.5
here is my actual coding:
# UNQ_C1
# GRADED FUNCTION: compute_cost
def compute_cost(x, y, w, b):
# moderator edit: code removed
Can someone take a look and provide some guidance? I have similar issues on the gradient descent problem.
This is all new to me and I do not have a very clear understanding yet.
I appreciate everyone’s time and assistance.
Best regards,
Rich Kline