-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The cost function code return opposite sign #76
Comments
If the labels can only be 1 or 0, one of the costs will always be 0. -0 * anything = 0 Or 1-1 * anything = 0 |
What I mean was, when label is 0, |
@SendToSpace You're correct. The - sign got moved inside the parens in the equation just above the code as well. |
Nice catch if you have time for a pr that would be awesome! |
Hey @bfortuner, Can I make a PR for this? I'm just a beginner wanted to start contributing ot Open Source. |
#Take the error when label=1
class1_cost = -labels*np.log(predictions)
In this code, it seem like class1 return positive cost and class2 return negative cost, wouldn't they cancel when added?
The text was updated successfully, but these errors were encountered: