I am getting the same error in Exercise1 -
Here is the code:
# GRADED FUNCTION: cofi_cost_func
# UNQ_C1
def cofi_cost_func(X, W, b, Y, R, lambda_)
========
While running the below code getting error-
Public tests
from public_tests import *
test_cofi_cost_func(cofi_cost_func)
=========
AssertionError Traceback (most recent call last)
in
1 # Public tests
2 from public_tests import *
----> 3 test_cofi_cost_func(cofi_cost_func)
~/work/public_tests.py in test_cofi_cost_func(target)
14 J = target(X_r, W_r, b_r, Y_r, R_r, 2);
15 assert not np.isclose(J, 13.5), f"Wrong value. Got {J}. Did you multiply the regularization term by lambda_?"
—> 16 assert np.isclose(J, 27), f"Wrong value. Expected {27}, got {J}. Check the regularization term"
17
18
AssertionError: Wrong value. Expected 27, got 540.0. Check the regularization term
Can someone help, what is wrong with the code?