Socket
Socket
Sign inDemoInstall

ml-naivebayes

Package Overview
Dependencies
5
Maintainers
7
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ml-naivebayes

Naive bayes library


Version published
Weekly downloads
123
decreased by-37.24%
Maintainers
7
Install size
443 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 29 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc