An open API service indexing awesome lists of open source software.

https://github.com/freakwill/nb-combination

ensemble classifier with naive bayes combination
https://github.com/freakwill/nb-combination

bayes-classifier python scikit-learn

Last synced: about 1 month ago
JSON representation

ensemble classifier with naive bayes combination

Awesome Lists containing this project

README

          

# 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

```python
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))
```