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 observed 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(
n_nodes=100,
dag=ErdosReny(p=0.01),
conditionals=PolynomialConditional(max_terms=5)
)
df = model.sample(10000)
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
bn_testing-0.8.0.tar.gz
(20.9 kB
view hashes)
Built Distribution
bn_testing-0.8.0-py3-none-any.whl
(21.7 kB
view hashes)
Close
Hashes for bn_testing-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c210d2e49d55b3f8762854042a0dbeb9d665ef13b5724cba096e5f9e5b39c65 |
|
MD5 | 592cee0276931e54f827423251c4d6a8 |
|
BLAKE2b-256 | 9d99fb7f9f68819e1669c150f15c03401eb246f2a047882ce8eb0d6cf1495a74 |