[PATCH] Add python-hdbscan

  • Done
  • quality assurance status badge
Details
2 participants
  • Kiran Shila
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Kiran Shila
Severity
normal
K
K
Kiran Shila wrote on 10 Aug 2022 07:18
(address . guix-patches@gnu.org)(name . Kiran Shila)(address . me@kiranshila.com)
20220810051851.329112-1-me@kiranshila.com
---
gnu/packages/python-science.scm | 41 +++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (58 lines)
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
S
S
Sharlatan Hellseher wrote on 30 Jan 00:02 +0100
(address . 57099-done@debbugs.gnu.org)
8734ufu4ik.fsf@gmail.com
Modifications applied:
- simplify package by using pyproject-build-system
- add 'build-extensions to pass 'check phase
- update to the lates upstream version 0.8.33
- python-cython moved to native-inputs
- fix all lint wrnings
- use HTTPS for home-page

Pushed as cdadef64093fc12fd335a2b7b54d4b05c829107e to master.

Thanks,
Oleg
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEmEeB3micIcJkGAhndtcnv/Ys0rUFAmW4LqMACgkQdtcnv/Ys
0rUwLg/+Jd5jkCf6tXScRs8fnScXVSlB5GpnI/iClMrcp0uEwmSNhmGA4OXlg59U
c+NgXRU5gYmnq9wH4OAOXbO1pPAM7YNCbx5RZi2DWMXBcYeM0f/UPM4zNx5U5F7o
6CNWuaj5lQfMAzLTknHHCmWKukXbPEXwAYGo8TSgR2yMzy1kc0GRHDwxmvwwzYj5
OUfWmfApeL3r64zQPQFB0ApgX1bufkXvMMbeMlcXg/12YGkyhTO40NvB1jnz8vXl
zoX4y0/7dytFgT9bjGmLC3nRle1j1yqgTbjiyQE5cXViV2igu0zvRZue/68TsLdi
uRXsIe/8ApLcEhI0hsZAxHVrnS2T0B8cI+2/il9ePOOrbAIGr132IXR/6AuGP0yw
wZ6eb90xKnioFq5I5fMrWvIGK6OA/6u6BajPZp1D40O1vgD/1ZPJOSrwPfMTf6hI
wCWJktwDCl4F/ypVVChuT9XBgB1yvlhbccO6CMpEd9U89llLOqlFS0X0mW72sV6i
o3aoCPw79ezHHunerpKO2fvFrFG/zkGOFbz2ZPX2oJ7ueBbbgAosAwm9ki1Q7Lt4
aFvV7N7GHFFB7fwk/T4T/lUqU4M94yetFjlzW9QBD0qVj3Dsent4jh9DfIhJEL/n
wgPjdkGFf3kHd92arEu+/rfUUW223d7kIg3rzU6muaTxrG0B5uc=
=SG3i
-----END PGP SIGNATURE-----

Closed
?