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
Metadata
Release files for bn-testing 0.12.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bn_testing-0.12.2.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bn_testing-0.12.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.5 kB
Release files / bn_testing-0.12.2.tar.gz
| Download URL | bn_testing-0.12.2.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbeed23c5a93a11f4b35832ca30af2d61ee45004347c60a73f16d94ff99cd96f
|
|
BLAKE2b-256 checksum How to use checksums |
8f09b540a7c48b061552232bd26af396efa8ec0b3ad1b929765f48196eb8b609
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|
Release files / bn_testing-0.12.2-py3-none-any.whl
| Download URL | bn_testing-0.12.2-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1b1bdc33f888cfd125918e498689e1039aef53443488c13bcc304d8d30304c0
|
|
BLAKE2b-256 checksum How to use checksums |
13702c16156ceb6431814e54d59647a20d003b60c7e51f51fbccce8bfb11ce29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.4
|