From 5795fbbd0ff915ffd5a0271f46198455b94e2555 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 27 Aug 2021 13:37:08 +0200 Subject: gnu: Add python-hmmlearn. * gnu/packages/machine-learning.scm (python-hmmlearn): New variable. --- gnu/packages/machine-learning.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index fd06582e50..e1dff82bfc 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -2719,3 +2719,39 @@ PyTorch when needed. Note: currently this package does not provide GPU support.") (license license:bsd-3))) + +(define-public python-hmmlearn + (package + (name "python-hmmlearn") + (version "0.2.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "hmmlearn" version)) + (sha256 + (base32 + "1my0j3rzp17438idr32ssh0j969a98yjblx5igx5kgiiigr9qa1a")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key inputs outputs tests? #:allow-other-keys) + (when tests? + (add-installed-pythonpath inputs outputs) + (with-directory-excursion (string-append (assoc-ref outputs "out") "/lib") + (invoke "python" "-m" "pytest")))))))) + (propagated-inputs + `(("python-cython" ,python-cython) + ("python-numpy" ,python-numpy) + ("python-scikit-learn" ,python-scikit-learn) + ("python-scipy" ,python-scipy) + ("python-setuptools-scm" ,python-setuptools-scm))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (home-page "https://github.com/hmmlearn/hmmlearn") + (synopsis "Hidden Markov Models with scikit-learn like API") + (description + "Hmmlearn is a set of algorithms for unsupervised learning and inference +of Hidden Markov Models.") + (license license:bsd-3))) -- cgit v1.2.3