A test bench to benchmark learn algorithms for graphical models
Project description
BN testing
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bn_testing-0.12.2.tar.gz.
File metadata
- Download URL: bn_testing-0.12.2.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbeed23c5a93a11f4b35832ca30af2d61ee45004347c60a73f16d94ff99cd96f
|
|
| MD5 |
d93a05da8924594f00045591a1bcdcbe
|
|
| BLAKE2b-256 |
8f09b540a7c48b061552232bd26af396efa8ec0b3ad1b929765f48196eb8b609
|
File details
Details for the file bn_testing-0.12.2-py3-none-any.whl.
File metadata
- Download URL: bn_testing-0.12.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1b1bdc33f888cfd125918e498689e1039aef53443488c13bcc304d8d30304c0
|
|
| MD5 |
71026e2b4b8bb70feb3772f07bee998c
|
|
| BLAKE2b-256 |
13702c16156ceb6431814e54d59647a20d003b60c7e51f51fbccce8bfb11ce29
|