diff options
| author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2015-05-28 15:53:14 +0200 |
|---|---|---|
| committer | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2015-06-12 12:57:30 +0200 |
| commit | 741115b6490c111f9db7b86964b13bdb22fd6dd0 (patch) | |
| tree | 0479aeea086c13f6372b228bdb27965327851cd7 | |
| parent | e0a02cb21f7758f5e60f518f9ee115b64aac74da (diff) | |
gnu: Add libsvm.
* gnu/packages/machine-learning.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
| -rw-r--r-- | gnu-system.am | 1 | ||||
| -rw-r--r-- | gnu/packages/machine-learning.scm | 65 |
2 files changed, 66 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am index 978e839bfa3..d79c2c79176 100644 --- a/gnu-system.am +++ b/gnu-system.am | |||
| @@ -196,6 +196,7 @@ GNU_SYSTEM_MODULES = \ | |||
| 196 | gnu/packages/lxqt.scm \ | 196 | gnu/packages/lxqt.scm \ |
| 197 | gnu/packages/lynx.scm \ | 197 | gnu/packages/lynx.scm \ |
| 198 | gnu/packages/m4.scm \ | 198 | gnu/packages/m4.scm \ |
| 199 | gnu/packages/machine-learning.scm \ | ||
| 199 | gnu/packages/man.scm \ | 200 | gnu/packages/man.scm \ |
| 200 | gnu/packages/mail.scm \ | 201 | gnu/packages/mail.scm \ |
| 201 | gnu/packages/make-bootstrap.scm \ | 202 | gnu/packages/make-bootstrap.scm \ |
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm new file mode 100644 index 00000000000..78d7e649a9e --- /dev/null +++ b/gnu/packages/machine-learning.scm | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | ||
| 2 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> | ||
| 3 | ;;; | ||
| 4 | ;;; This file is part of GNU Guix. | ||
| 5 | ;;; | ||
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | ||
| 7 | ;;; under the terms of the GNU General Public License as published by | ||
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at | ||
| 9 | ;;; your option) any later version. | ||
| 10 | ;;; | ||
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but | ||
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | ;;; GNU General Public License for more details. | ||
| 15 | ;;; | ||
| 16 | ;;; You should have received a copy of the GNU General Public License | ||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | (define-module (gnu packages machine-learning) | ||
| 20 | #:use-module ((guix licenses) #:prefix license:) | ||
| 21 | #:use-module (guix packages) | ||
| 22 | #:use-module (guix utils) | ||
| 23 | #:use-module (guix download) | ||
| 24 | #:use-module (guix build-system gnu) | ||
| 25 | #:use-module (gnu packages)) | ||
| 26 | |||
| 27 | (define-public libsvm | ||
| 28 | (package | ||
| 29 | (name "libsvm") | ||
| 30 | (version "3.20") | ||
| 31 | (source | ||
| 32 | (origin | ||
| 33 | (method url-fetch) | ||
| 34 | (uri (string-append | ||
| 35 | "https://github.com/cjlin1/libsvm/archive/v" | ||
| 36 | (string-delete #\. version) ".tar.gz")) | ||
| 37 | (file-name (string-append name "-" version ".tar.gz")) | ||
| 38 | (sha256 | ||
| 39 | (base32 | ||
| 40 | "1jpjlql3frjza7zxzrqqr2firh44fjb8fqsdmvz6bjz7sb47zgp4")))) | ||
| 41 | (build-system gnu-build-system) | ||
| 42 | (arguments | ||
| 43 | `(#:tests? #f ;no "check" target | ||
| 44 | #:phases (modify-phases %standard-phases | ||
| 45 | (delete 'configure) | ||
| 46 | (replace | ||
| 47 | 'install | ||
| 48 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 49 | (let* ((out (assoc-ref outputs "out")) | ||
| 50 | (bin (string-append out "/bin/"))) | ||
| 51 | (mkdir-p bin) | ||
| 52 | (for-each (lambda (file) | ||
| 53 | (copy-file file (string-append bin file))) | ||
| 54 | '("svm-train" | ||
| 55 | "svm-predict" | ||
| 56 | "svm-scale"))) | ||
| 57 | #t))))) | ||
| 58 | (home-page "http://www.csie.ntu.edu.tw/~cjlin/libsvm/") | ||
| 59 | (synopsis "Library for Support Vector Machines") | ||
| 60 | (description | ||
| 61 | "LIBSVM is a machine learning library for support vector | ||
| 62 | classification, (C-SVC, nu-SVC), regression (epsilon-SVR, nu-SVR) and | ||
| 63 | distribution estimation (one-class SVM). It supports multi-class | ||
| 64 | classification.") | ||
| 65 | (license license:bsd-3))) | ||
