JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 443
  • Score
    100M100P100Q94360F
  • License MIT

Naive bayes library

Package Exports

  • ml-naivebayes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ml-naivebayes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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