Machine learning in Clojure
Asked Answered
R

2

7

We have theano and numpy in Python to do symbolic and numeric computations, optimising our Machine Learning computations (eg: Matrix multiplications and GPU usage). What are the relevant tools in Clojure to do Machine learning (or at least things like matrix multiplications)?

Rayner answered 15/6, 2015 at 17:13 Comment(0)
P
6

An important library / tool for mathematical operations, statistics and more in Clojure is incanter. There is also clatrix wrapping jBlas for matrix operations.

With regard to machine learning in general, there are at least two libraries interfacing / wrapping Apache Spark which includes MLlib for machine learning: there is sparking and flambo. clj-ml is basically a wrapper around Weka and some additions. Finally, clojure-opennlp is a wrapper around opennlp, an NLP toolkit comparable to NLTK in Python.

This list of ML tools provides quite some more links.

Pantalets answered 16/6, 2015 at 11:36 Comment(0)
Q
3

For the matrix/vector side there's core.matrix which is a plug-able library with an implementation at vectorz-clj that is being actively developed, and other high perf libs exist. Usage from the readme:

(def M (matrix [[1 2] [3 4]]))
(def v (matrix [1 2]))
(mul M v)
=> #<Matrix22 [[1.0,4.0],[3.0,8.0]]>

A 'mentor' to the project mentioned on an answer to this SO question that GPU was a target, but no mention of it in the docs.

What kind of specific functionality do you need as your question is a bit broad? Have you tried anything?

Quadriplegia answered 15/6, 2015 at 18:46 Comment(1)
Basically something that allows numeric operations to be done efficiently (as if I am using Octave / Matlab). core.matrix is definitely something i am looking for. Thanks!Rayner

© 2022 - 2024 — McMap. All rights reserved.