New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bayesian-network

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bayesian-network - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "bayesian-network",
"version": "1.0.0",
"version": "1.0.1",
"description": "A simple Bayesian Network classifer based on Baye's rule and the conditional independence assumption.",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -1,3 +0,25 @@

# Bayesian Network for Classification
# Bayesian Network
A simple Bayesian network based on Baye's rule and the conditional independence assumption.
## Example Usage
```javascript
const classifier = new BayesianNetwork();
classifier.addDocument("hello you are amazing", "positive");
classifier.addDocument("today is a beautiful day", "positive");
classifier.addDocument("its dark out today", "negative");
classifier.addDocument("today was bad", "negative");
classifier.calculateLogFrequencies();
console.log(classifier.classify('hello you are great'));
/*
{
classification: { label: 'POSITIVE', value: -6.238324625039508 },
labels: { POSITIVE: -6.238324625039508, NEGATIVE: -6.238324625039508 }
}
*/
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc