Skip to content

averinpa/bnm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BNM: Bayesian Network Metrics

BNM is a Python package for evaluating, comparing, and visualizing DAGs. It provides an intuitive interface for exploring both global and local graph structures, offering a rich set of metrics and visual tools.

Originally developed as DAGMetrics in R for analyzing Bayesian Networks in microbial abundance data (Averin et al., 2025), BNM is the Python implementation of DAGMetrics with extended functionality.


🚀 Key Features

  • Descriptive Metrics: Analyze structural properties of individual DAGs — including number of edges, colliders, root/leaf nodes, and more.
  • Comparative Metrics: Quantify similarity between DAGs using metrics like Structural Hamming Distance (SHD), Hamming Distance (HD), true/false positives, F1 score, and others.
  • Local Structure Analysis: Explore and compare the Markov blankets of selected nodes to understand the structure of a system at a granular level.
  • Visual Comparisons: Generate side-by-side visualizations of DAGs, highlighting shared edges.
  • Model Evaluation: Compare multiple models (e.g., from different algorithm runs or hyperparameter settings) to assess model stability and complexity.

📦 Installation

You can install the package directly from GitHub:

pip install git+https://github.com/averinpa/bnm.git

📚 Documentation


📬 License

This project is licensed under the MIT License.


✍️ Author

Pavel Averin
GitHub: @averinpa

About

Metrics for evaluating DAGs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors