MLS Course 1 Week 3 practice lab (evaluating logistic regression)

Hi there, sorry to bother but I am really stuck on my code here. I am not sure what is wrong with it but it keeps returning my code as an assertion error.

If anybody could give me a hand it would be greatly appreciated

Hello @Felix_De_Balanzo_Oli

Welcome to the community!

Kindly note that we are not allowed to publicly post our solutions on the forum.

Regarding your problem: Please take a look at the threshold value that your are setting.

A tip for the future: If you get an assertion error, it would be helpful if you post a screen capture image that shows it.

Often the mentors can diagnose a problem just from the error messages.

1 Like

Thank you! I am very excited to learn as much as possible with this community. And thanks for the feedback :sweat_smile:
:sweat_smile:

You are welcome @Felix_De_Balanzo_Oli :blush:

Hello! I followed all of the hints pretty closely but it doesn’t look like my compute_cost function is returning the right value.

When I run the test I notice it’s returning double the value I would expect to see, not sure why. When I half the value this test passes but the next test fails.

Any hint what I’m missing?! Thanks!

Hi @raydot, you only need to add bias and accumulate loss once per sample.

P.S. We don’t encourage learners to share assignment code, so I am removing it.

Goodness, wasn’t watching my indents! Thanks so much @rmwkwok

You are welcome @raydot