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

Fix AttributeError in test_naive_bayes.py #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yjin07
Copy link

@yjin07 yjin07 commented Oct 29, 2023

Fixed an AttributeError in test_naive_bayes.py caused by trying to access the non-existent sigma_ attribute of the GaussianNB object from sklearn.

In more recent versions of sklearn, the var_ attribute should be used to obtain the variances for each class, instead of sigma_. This change replaces all references of sklearn_NB.sigma_ with sklearn_NB.var_ to ensure the code is compatible with the current sklearn API.

This modification ensures the correct execution of the tests and aligns with the latest version of sklearn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant