check your regularization term.

your error is stating you have implemented the regularization term lambda_ incorrectly to J.

refer the hints below the grader cell.

you code is ending at j = j/2

i

**regularization**Regularization just squares each element of the W array and X array and them sums all the squared elements. You can utilize np.square() and np.sum().

Check your codes for J.

While implementing codes for cost is for non-regularized implementation

and then

for regularization implementation

you are probably doing in the incorrect way of first using the regularized implementation and then applying the non-regularized implementation, hence getting this error.

tell me all the codes you wrote for J

tell me the first

Step 1. J code where it mention under the loop below ( notice the position of this code is not same as the other two steps as it comes under loop

step 2 then J = J/2

step 3 then regularized implemented J code

{moderator edit: code removed}

this code is incorrect. Did you try to have a look at the hints below the grader cell where you wrote codes.

hints step by step,

this is not required

Incorrect code, you do not require to sum up b to the regularized implementation of cost J

thanks so much for you it graded all tests is pass

@TMosh Thanks Tom Tom for removing the codes.

Salma don’t post codes next time, I only asked for correcting purpose. It is against community guidelines.

Sorry i will be careful for the next time

hey DEEPTI i am having the same problem

Hi Salma, could you please share how you made it work? I am facing the same issue.

is your issue resolved???