Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

generative-bayesian-network

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generative-bayesian-network

An implementation of a bayesian network usable for .

  • 0.1.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67K
decreased by-0.32%
Maintainers
1
Weekly downloads
 
Created
Source

Generative bayesian network

NodeJs package containing a bayesian network capable of randomly sampling from a distribution defined by a json file.

  • Installation
  • Usage
  • Examples
  • API Reference

Installation

Usage

Examples

API Reference

All public classes, methods and their parameters can be inspected in this API reference.

BayesianNetwork

BayesianNetwork is an implementation of a bayesian network capable of randomly sampling from the distribution represented by the network.


new BayesianNetwork(networkDefinition)
ParamTypeDescription
networkDefinitionobjectobject defining the network structure and distributions

bayesianNetwork.generateSample(inputValues)

Randomly samples from the distribution represented by the bayesian network. Can generate samples not found in the data used to create the definition file.

ParamTypeDescription
inputValuesobjectnode values that are known already

bayesianNetwork.generateConsistentSampleWhenPossible(valuePossibilities)

Randomly samples from the distribution represented by the bayesian network. Cannot generate samples not found in the data used to create the definition file, so it only generates samples when it is possible to be consistent with the data.

ParamTypeDescription
valuePossibilitiesobjecta dictionary of lists of possible values for nodes (if a node isn't present in the dictionary, all values are possible)

FAQs

Package last updated on 08 Apr 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc