-
Notifications
You must be signed in to change notification settings - Fork 214
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
KeyError in notebook "1. Intro..." #54
Comments
@ansgar-t Yes, this seems to be an issue. Thanks for reporting it. But I think it would be better to assign None/Nan for keys that don't exist. As 0 is an actual class value which would lead to mis-classification. Something like: |
you're right about the else case, of course. "0.0" doesn't make sense there. looks like I thought of separating 2 steps:
... and then I didn't. :) |
having said that... I think adding the following code to the preparation of joint_prob would be my preferred solution now:
|
@ansgar-t Sorry for the super late reply. Yes, this solution also looks good. Would be great if you would open a PR with the fix :). Thanks |
Depending on the random train/test split this code can give a key error:
Here's a possible alternative:
The text was updated successfully, but these errors were encountered: