diff mbox series

[bug#64258,2/2] gnu: Add python-pgmpy.

Message ID 41f25625a289da3808c54e5f80d353bb2dd41125.1687554529.git.felgru@posteo.net
State New
Headers show
Series Add pgmpy library for Bayesian Networks. | expand

Commit Message

Felix Gruber June 23, 2023, 9:12 p.m. UTC
* gnu/packages/statistics.scm (python-pgmpy): New variable.
---
 gnu/packages/statistics.scm | 44 +++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index e025653338..dff8f4af6b 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -18,6 +18,7 @@ 
 ;;; Copyright © 2021 Frank Pursel <frank.pursel@gmail.com>
 ;;; Copyright © 2022 Simon Tournier <zimon.toutoune@gmail.com>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
+;;; Copyright © 2023 Felix Gruber <felgru@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -81,6 +82,7 @@  (define-module (gnu packages statistics)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
@@ -7444,3 +7446,45 @@  (define-public ruby-enumerable-statistics
 statistical summary in arrays and enumerables.")
     (home-page "https://github.com/mrkn/enumerable-statistics")
     (license license:expat)))
+
+(define-public python-pgmpy
+  (package
+    (name "python-pgmpy")
+    (version "0.1.22")
+    (source
+     (origin
+       (method git-fetch)  ;pypi package does not include test data
+       (uri (git-reference
+             (url "https://github.com/pgmpy/pgmpy")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "03p8wbac4i4968h6639bqq0z4pg4aynhw3y28iv4l95cimgbr55i"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-daft
+                             python-joblib
+                             python-networkx
+                             python-numpy
+                             python-opt-einsum
+                             python-pandas
+                             python-pyparsing
+                             python-pytorch
+                             python-scikit-learn
+                             python-scipy
+                             python-statsmodels
+                             python-tqdm))
+    (native-inputs (list python-black
+                         python-codecov
+                         python-coverage
+                         python-mock
+                         python-pytest
+                         python-pytest-cov
+                         python-xdoctest))
+    (home-page "https://github.com/pgmpy/pgmpy")
+    (synopsis "Probabilistic Graphical Models library")
+    (description "This package provides a library for Probabilistic
+Graphical Models. It can be used for learning (Structure and Parameter),
+inference (Probabilistic and Causal), and simulations in Bayesian
+Networks.")
+    (license license:expat)))