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

bn-testing

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bn-testing

A test bench to benchmark learn algorithms for graphical models

  • 0.12.2
  • PyPI
  • Socket score

Maintainers
1

BN testing

Test Package Documentation Status PyPI

A test framework to evaluate methods that learn Bayesian Networks from high-dimensional observational data.

Sampling

Set up the graphical model and sample data

from bn_testing.models import BayesianNetwork
from bn_testing.dags import ErdosReny
from bn_testing.conditionals import PolynomialConditional


model = BayesianNetwork(
   dag=ErdosReny(p=0.01, n_nodes=100),
   conditionals=PolynomialConditional(max_terms=5)
)

df = model.sample(10000, normalize=True)

The observations are stored in a pandas.DataFrame where the columns are the nodes of the DAG and each row is an observation. The underlying DAG of the graphical model can be accessed with model.dag

Keywords

FAQs


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