Skip to content

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