https://github.com/r0man/svm-clj
A LibSVM wrapper for Clojure
https://github.com/r0man/svm-clj
Last synced: 6 months ago
JSON representation
A LibSVM wrapper for Clojure
- Host: GitHub
- URL: https://github.com/r0man/svm-clj
- Owner: r0man
- License: epl-1.0
- Created: 2012-01-10T20:12:24.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2019-12-19T22:16:10.000Z (about 6 years ago)
- Last Synced: 2025-03-18T03:13:22.746Z (10 months ago)
- Language: Clojure
- Homepage:
- Size: 49.8 KB
- Stars: 34
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.org
- Funding: .github/FUNDING.yml
- License: COPYING
Awesome Lists containing this project
README
* SVM-CLJ
[[https://clojars.org/svm-clj][https://img.shields.io/clojars/v/svm-clj.svg]]
[[https://travis-ci.org/r0man/svm-clj][https://travis-ci.org/r0man/svm-clj.svg]]
[[https://versions.deps.co/r0man/svm-clj][https://versions.deps.co/r0man/svm-clj/status.svg]]
[[https://versions.deps.co/r0man/svm-clj][https://versions.deps.co/r0man/svm-clj/downloads.svg]]
A LibSVM wrapper for Clojure.
** Installation
Via Clojars: http://clojars.org/svm-clj.
** Usage
#+BEGIN_SRC clojure
(use 'svm.core)
; Load the heart scale example dataset.
(def dataset (read-dataset "test-resources/heartscale"))
; Train a SVM model.
(def model (train-model dataset))
; Get the feature map you want to predict.
(def feature (last (first dataset)))
;=> {1 0.708333, 2 1.0, 3 1.0, ...}
; Label it.
(predict model feature)
;=> 1.0
#+END_SRC
** License
Copyright (C) 2011-2019 r0man
Distributed under the Eclipse Public License, the same as Clojure.