unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Kiran Shila <me@kiranshila.com>
To: 57099@debbugs.gnu.org
Cc: Kiran Shila <me@kiranshila.com>
Subject: [bug#57099] [PATCH] Add python-hdbscan
Date: Tue,  9 Aug 2022 22:18:51 -0700	[thread overview]
Message-ID: <20220810051851.329112-1-me@kiranshila.com> (raw)

---
 gnu/packages/python-science.scm | 41 +++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 95f60aae7b..758079c8b6 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
 ;;; Copyright © 2022 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2022 Eric Bavier <bavier@posteo.net>
+;;; Copyright © 2022 Kiran Shila <me@kiranshila.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1478,3 +1479,43 @@ (define-public python-opt-einsum
 well as potentially any library which conforms to a standard API. See the
 documentation for more information.")
     (license license:expat)))
+
+(define-public python-hdbscan
+  (package
+    (name "python-hdbscan")
+    (version "0.8.28")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "hdbscan" version))
+              (sha256
+               (base32
+                "0nn0xm9ji74pkil1lbkrskmyak25jx4av8cdqg2dzgiv5wgzgnpf"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:modules ((ice-9 ftw)
+                  (srfi srfi-1)
+                  (guix build utils)
+                  (guix build python-build-system))
+       #:phases (modify-phases
+                    %standard-phases
+                  (replace 'check
+                    (lambda* (#:key tests? #:allow-other-keys)
+                      (when tests?
+                        (let ((outdir (string-append
+                                       (getcwd) "/build/"
+                                       (car (filter (lambda (s) (string-contains s "lib"))
+                                                    (scandir "build"))))))
+                          (invoke "pytest" "-vv" outdir))))))))
+    (propagated-inputs (list python-cython python-joblib python-numpy
+                             python-scikit-learn python-scipy))
+    (native-inputs (list python-nose python-pytest python-pandas python-networkx))
+    (home-page "http://github.com/scikit-learn-contrib/hdbscan")
+    (synopsis "Clustering based on density with variable density clusters")
+    (description "HDBSCAN - Hierarchical Density-Based Spatial Clustering of
+Applications with Noise. Performs DBSCAN over varying epsilon values and
+integrates the result to find a clustering that gives the best stability over
+epsilon. This allows HDBSCAN to find clusters of varying densities (unlike
+DBSCAN), and be more robust to parameter selection. HDBSCAN is ideal for
+exploratory data analysis; it's a fast and robust algorithm that you can trust
+to return meaningful clusters (if there are any).")
+    (license license:bsd-3)))
-- 
2.37.1





             reply	other threads:[~2022-08-10  5:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10  5:18 Kiran Shila [this message]
2024-01-29 23:02 ` bug#57099: [PATCH] Add python-hdbscan Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220810051851.329112-1-me@kiranshila.com \
    --to=me@kiranshila.com \
    --cc=57099@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).