Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

ml-naivebayes

4.0.0 • Public • Published

ml-naivebayes

NPM version build status Test coverage npm download

Naive bayes classifiers.

Installation

npm install ml-naivebayes

API Documentation

Usage

GaussianNB

// 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);

MultinomialNB

// 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

Install

npm i ml-naivebayes

DownloadsWeekly Downloads

164

Version

4.0.0

License

MIT

Unpacked Size

23.8 kB

Total Files

9

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar