gistlib
You can set var_smoothing parameter in Gaussian Naive Bayes classifier from scikit-learn to achieve equal variance:
var_smoothing
main.pyfrom sklearn.naive_bayes import GaussianNB # Initialize the Gaussian Naive Bayes classifier with equal variances equal_var_nb = GaussianNB(var_smoothing=1e-09) 161 chars5 lines
from sklearn.naive_bayes import GaussianNB # Initialize the Gaussian Naive Bayes classifier with equal variances equal_var_nb = GaussianNB(var_smoothing=1e-09)
gistlibby LogSnag