Skip to content

Freakwill/nb-combination

Repository files navigation

nb-combination

ensemble classifier with naive bayes combination

The algorithm is implemented in nb_comb.py

Download

Just download it from github.

use

just run script.py and have a look at the source code.

Example

X=np.array([[1,2,3.1],[2,2,2.3],[1,1,1.1], [1,1,2.1]])
Y= [0,1,0,1]
from sklearn.naive_bayes import *
estimators = [('multinomial', MultinomialNB()), ('gauss', GaussianNB())]
model = NBAdditive(estimators)
model.fit(X, Y, inds=[[0,1], [2]])
print(model.predict(X))

About

ensemble classifier with naive bayes combination

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages