Skip to content

victorbadila/naive-bayes

 
 

Repository files navigation

ml-naivebayes

NPM version build status Test coverage npm download

Naive bayes classifiers.

Installation

npm install ml-naivebayes

Usage

// assuming that you created Xtrain, Xtest, Ytrain, Ytest
import { GaussianNB } from 'ml-naivebayes';

var model = new GaussianNB();
model.train(Xtrain, Ytrain);

var predictions = model.predict(Xtest);
// assuming that you created Xtrain, Xtest, Ytrain, Ytest
import { MultinomialNB } from 'ml-naivebayes';

var model = new MultinomialNB();
model.train(Xtrain, Ytrain);

var predictions = model.predict(Xtest);

Authors

License

MIT

About

Naive bayes classifier.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%