[PATCH 0/4] gnu: Add cl-random-forest.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Pierre Neidhardt
Owner
unassigned
Submitted by
Guillaume Le Vaillant
Severity
normal
G
G
Guillaume Le Vaillant wrote on 3 Oct 2019 14:06
(address . guix-patches@gnu.org)
874l0qrq2z.fsf@yamatai
This patch series adds the cl-random-forest Common Lisp machine learning
library.
G
G
Guillaume Le Vaillant wrote on 3 Oct 2019 14:11
[PATCH 1/4] gnu: Add cl-store.
(address . 37597@debbugs.gnu.org)(name . Guillaume Le Vaillant)(address . glv@posteo.net)
20191003121131.20803-1-glv@posteo.net
* gnu/packages/lisp.scm (sbcl-cl-store, cl-store, ecl-cl-store): New
variables.
---
gnu/packages/lisp.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index ba009bb7a6..17d037c264 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -7360,3 +7360,35 @@ compression/decompression using bindings to the lzlib C library.")
(define-public ecl-lzlib
(sbcl-package->ecl-package sbcl-lzlib))
+
+(define-public sbcl-cl-store
+ (let ((commit "cd01f2610d3360dc01ab972bd9317407aaea7745")
+ (revision "0"))
+ (package
+ (name "sbcl-cl-store")
+ (version (git-version "0.8.11" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/skypher/cl-store.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "05b7kh5af2ax7vlmphpac4vbqr84j5ivppj96qzb64fxpjpqglm4"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ `(("rt" ,sbcl-rt)))
+ (synopsis "Common Lisp library to serialize data")
+ (description
+ "CL-STORE is a portable serialization package which should give you the
+ability to store all Common Lisp data types into streams.")
+ (home-page "http://www.common-lisp.net/project/cl-store/")
+ (license license:expat))))
+
+(define-public cl-store
+ (sbcl-package->cl-source-package sbcl-cl-store))
+
+(define-public ecl-cl-store
+ (sbcl-package->ecl-package sbcl-cl-store))
--
2.23.0
G
G
Guillaume Le Vaillant wrote on 3 Oct 2019 14:11
[PATCH 3/4] gnu: Add cl-online-learning.
(address . 37597@debbugs.gnu.org)(name . Guillaume Le Vaillant)(address . glv@posteo.net)
20191003121131.20803-3-glv@posteo.net
* gnu/packages/machine-learning.scm (sbcl-cl-online-learning,
cl-online-learning, ecl-cl-online-learning): New variables.
---
gnu/packages/machine-learning.scm | 39 +++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index a5b86b8010..2b46148095 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1956,3 +1956,42 @@ format.")
(define-public ecl-cl-libsvm-format
(sbcl-package->ecl-package sbcl-cl-libsvm-format))
+
+(define-public sbcl-cl-online-learning
+ (let ((commit "fc7a34f4f161cd1c7dd747d2ed8f698947781423")
+ (revision "0"))
+ (package
+ (name "sbcl-cl-online-learning")
+ (version (git-version "0.5" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/masatoi/cl-online-learning.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14x95rlg80ay5hv645ki57pqvy12v28hz4k1w0f6bsfi2rmpxchq"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ `(("prove" ,sbcl-prove)
+ ("prove-asdf" ,sbcl-prove-asdf)))
+ (inputs
+ `(("cl-libsvm-format" ,sbcl-cl-libsvm-format)
+ ("cl-store" ,sbcl-cl-store)))
+ (arguments
+ `(;; FIXME: Tests pass but then the check phase crashes
+ #:tests? #f))
+ (synopsis "Online Machine Learning for Common Lisp")
+ (description
+ "This library contains a collection of machine learning algorithms for
+online linear classification written in Common Lisp.")
+ (home-page "https://github.com/masatoi/cl-online-learning")
+ (license license:expat))))
+
+(define-public cl-online-learning
+ (sbcl-package->cl-source-package sbcl-cl-online-learning))
+
+(define-public ecl-cl-online-learning
+ (sbcl-package->ecl-package sbcl-cl-online-learning))
--
2.23.0
G
G
Guillaume Le Vaillant wrote on 3 Oct 2019 14:11
[PATCH 2/4] gnu: Add cl-libsvm-format.
(address . 37597@debbugs.gnu.org)(name . Guillaume Le Vaillant)(address . glv@posteo.net)
20191003121131.20803-2-glv@posteo.net
* gnu/packages/machine-learning.scm (sbcl-cl-libsvm-format, cl-libsvm-format,
ecl-cl-libsvm-format): New variables.
---
gnu/packages/machine-learning.scm | 38 +++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index e48c91a2cf..a5b86b8010 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,6 +34,7 @@
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix svn-download)
+ #:use-module (guix build-system asdf)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
@@ -58,6 +60,7 @@
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
+ #:use-module (gnu packages lisp)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages ocaml)
@@ -1918,3 +1921,38 @@ that:
@item Runs seamlessly on CPU and GPU.
@end itemize\n")
(license license:expat)))
+
+(define-public sbcl-cl-libsvm-format
+ (let ((commit "3300f84fd8d9f5beafc114f543f9d83417c742fb")
+ (revision "0"))
+ (package
+ (name "sbcl-cl-libsvm-format")
+ (version (git-version "0.1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/masatoi/cl-libsvm-format.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0284aj84xszhkhlivaigf9qj855fxad3mzmv3zfr0qzb5k0nzwrg"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ `(("prove" ,sbcl-prove)
+ ("prove-asdf" ,sbcl-prove-asdf)))
+ (inputs
+ `(("alexandria" ,sbcl-alexandria)))
+ (synopsis "LibSVM data format reader for Common Lisp")
+ (description
+ "This Common Lisp library provides a fast reader for data in LibSVM
+format.")
+ (home-page "https://github.com/masatoi/cl-libsvm-format")
+ (license license:expat))))
+
+(define-public cl-libsvm-format
+ (sbcl-package->cl-source-package sbcl-cl-libsvm-format))
+
+(define-public ecl-cl-libsvm-format
+ (sbcl-package->ecl-package sbcl-cl-libsvm-format))
--
2.23.0
G
G
Guillaume Le Vaillant wrote on 3 Oct 2019 14:11
[PATCH 4/4] gnu: Add cl-random-forest.
(address . 37597@debbugs.gnu.org)(name . Guillaume Le Vaillant)(address . glv@posteo.net)
20191003121131.20803-4-glv@posteo.net
* gnu/packages/machine-learning.scm (sbcl-cl-random-forest, cl-random-forest,
ecl-cl-random-forest): New variables.
---
gnu/packages/machine-learning.scm | 53 +++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (63 lines)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 2b46148095..0189e64467 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1995,3 +1995,56 @@ online linear classification written in Common Lisp.")
(define-public ecl-cl-online-learning
(sbcl-package->ecl-package sbcl-cl-online-learning))
+
+(define-public sbcl-cl-random-forest
+ (let ((commit "85fbdd4596d40e824f70f1b7cf239cf544e49d51")
+ (revision "0"))
+ (package
+ (name "sbcl-cl-random-forest")
+ (version (git-version "0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/masatoi/cl-random-forest.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "097xv60i1ndz68sg9p4pc7c5gvyp9i1xgw966b4wwfq3x6hbz421"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs
+ `(("prove" ,sbcl-prove)
+ ("prove-asdf" ,sbcl-prove-asdf)
+ ("trivial-garbage" ,sbcl-trivial-garbage)))
+ (inputs
+ `(("alexandria" ,sbcl-alexandria)
+ ("cl-libsvm-format" ,sbcl-cl-libsvm-format)
+ ("cl-online-learning" ,sbcl-cl-online-learning)
+ ("lparallel" ,sbcl-lparallel)))
+ (arguments
+ `(;; The tests download data from the Internet
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'add-sb-cltl2-dependency
+ (lambda _
+ ;; sb-cltl2 is required by lparallel when using sbcl, but it is
+ ;; not loaded automatically.
+ (substitute* "cl-random-forest.asd"
+ (("\\(in-package :cl-user\\)")
+ "(in-package :cl-user) #+sbcl (require :sb-cltl2)"))
+ #t)))))
+ (synopsis "Random Forest and Global Refinement for Common Lisp")
+ (description
+ "Cl-random-forest is an implementation of Random Forest for multiclass
+classification and univariate regression written in Common Lisp. It also
+includes an implementation of Global Refinement of Random Forest.")
+ (home-page "https://github.com/masatoi/cl-random-forest")
+ (license license:expat))))
+
+(define-public cl-random-forest
+ (sbcl-package->cl-source-package sbcl-cl-random-forest))
+
+(define-public ecl-cl-random-forest
+ (sbcl-package->ecl-package sbcl-cl-random-forest))
--
2.23.0
P
P
Pierre Neidhardt wrote on 6 Oct 2019 14:39
Re: [bug#37597] [PATCH 0/4] gnu: Add cl-random-forest.
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 37597@debbugs.gnu.org)
877e5igia4.fsf@ambrevar.xyz
Merged. Thanks!

Tiny edit: I've capitalized "CL" in the description of sbcl-cl-random-forest.

Cheers!

--
Pierre Neidhardt
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2Z4HMACgkQm9z0l6S7
zH+gQgf/cPhEg56tgI9/vuJOOYVnUZrdyuwVSy3PWlBySQbSuHirALLwyhaxRD5W
/r+Nc9pSNa4qY+q9ricRhFIh1FcClYy+IAIqM/o4V9I1pAbQjMQMdu/M7WMJJe++
5+cgZ0mmvrblO8Z/sg95Kuj56euIvvVQuUKCLnjWYeR6dQPHSnS2NP+Pdx9r5jJ5
bJTWZcTHFAqltvbHK+XufFn5wVQ+Nn/izp5b0/1Ek8aQXN2Niefcj05wr+D0cbRP
a8NkvMCik1v8mm3jazTRpaF5jQilNfEemvUSDmd40xzyy9WUTT+Ra4u4qX09lXVC
hfayuUKkDllPXEMJpk97zAslRQLijQ==
=mjXx
-----END PGP SIGNATURE-----

P
P
Pierre Neidhardt wrote on 6 Oct 2019 14:39
control message for bug #37597
(address . control@debbugs.gnu.org)
874l0mgi9r.fsf@ambrevar.xyz
close 37597
quit
?