Python library for Sum-Product Networks (SPNs)
Top 89.6% on sourcepulse
SPFlow is a Python library for building, learning, and performing inference on Sum-Product Networks (SPNs), a class of deep probabilistic models that allow for tractable inference. It is designed for researchers and practitioners in machine learning and probabilistic modeling who need efficient tools for complex probability distributions.
How It Works
SPFlow represents SPNs as a hierarchical structure of Sum and Product nodes, with various leaf node types (e.g., Categorical, Gaussian, PiecewiseLinear). It supports both a domain-specific language (DSL) and programmatic construction of SPNs. The library offers efficient implementations for inference tasks like marginalization, computing conditionals, and approximate Most Probable Explanation (MPE), as well as sampling and visualization utilities. Its functional-oriented API framework is designed for extensibility, allowing users to integrate custom inference and learning routines.
Quick Start & Requirements
pip3 install spflow
spn.gpu.TensorFlow
), NumPy.yay -S python-spflow
(includes a patch for TensorFlow 2 compatibility).Highlighted Details
learn_parametric
, learn_classifier
, learn_mspn
, learn_cnet
).Maintenance & Community
The project lists several academic institutions and researchers as authors and contributors, indicating active development and research backing. Links to community resources are not explicitly provided in the README.
Licensing & Compatibility
Limitations & Caveats
The README does not explicitly mention limitations such as unsupported platforms, known bugs, or performance bottlenecks. The project's reliance on specific TensorFlow versions might require careful dependency management.
1 month ago
1 week