Skip to content
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

NaiveBayes doesnt produce meaningful result on simple dataset #3226

Closed
ganik opened this issue Apr 5, 2019 · 1 comment
Closed

NaiveBayes doesnt produce meaningful result on simple dataset #3226

ganik opened this issue Apr 5, 2019 · 1 comment
Assignees
Projects

Comments

@ganik
Copy link
Member

ganik commented Apr 5, 2019

Use the same dataset as in PR #3159 for NB but get garbage results no matter how good is separation among classes

@codemzs
Copy link
Member

codemzs commented Apr 9, 2019

This is not a bug. Naive Bayes considers features to be binary in our implementation, that is how features are binned. In this sample pipeline all your features are greater than equal to zero that means the feature histogram for each class will be of the same size hence you are seeing this behavior. Please modify your code to have feature values take either negative or positive values.

When we were implementing Naive Bayes we thought about this case of features taking continuous values and for that we would need to implement Gaussian distribution to bin the features. However it wasn't a requirement at the time.

@codemzs codemzs added answered and removed bug Something isn't working labels Apr 9, 2019
@codemzs codemzs self-assigned this Apr 9, 2019
@codemzs codemzs closed this as completed Apr 9, 2019
@codemzs codemzs added this to Done in v1.0 via automation Apr 9, 2019
@dotnet dotnet locked as resolved and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
v1.0
  
Done
Development

No branches or pull requests

3 participants