Linear Algebra Package

118 views
Skip to first unread message

CuppoJava

unread,
Oct 5, 2009, 4:22:53 PM10/5/09
to Clojure
Hi,
I need to do some high performance numerical data crunching and was
wondering what libraries are popular. I have looked into Colt and
JAMA, but neither have had much development recently (Colt hasn't had
a release since 2004, and JAMA since 2005), and I'm not sure if
they're still alive. Clojuratica sounds promising, but I don't (yet)
own a Mathematica license. I would appreciate it if someone who's
familiar with the latest news about numerical processing in Java shed
some light on this topic.

Thanks a lot for your help
-Patrick

kyle smith

unread,
Oct 5, 2009, 6:00:57 PM10/5/09
to Clojure
clojuratica works with the free mathematica player. I don't think
there are any licensing issues, but I could be wrong. I need to do
more benchmarking, but the performance is pretty good so far.

Mark Reid

unread,
Oct 5, 2009, 8:34:12 PM10/5/09
to Clojure
Hi,

I think <a href="http://sites.google.com/site/piotrwendykier/software/
parallelcolt">Parallel Colt</a> has picked up where Colt left off.
It's a very full featured library and forms the basis of the Clojure
stats package <a href="http://incanter.org/>Incanter</a>.

Personally, I've used the sparse vector classes in Parallel Colt for a
<a href="http://github.com/mreid/injuce/blob/inplace/sgd.clj">simple
machine learning algorithm</a> and found it well designed and fast.

Regards,

Mark.

CuppoJava

unread,
Oct 5, 2009, 9:45:52 PM10/5/09
to Clojure
Thanks for the replies. Those are exactly what I need!
-Patrick

Garth Sheldon-Coulson

unread,
Oct 6, 2009, 12:21:48 AM10/6/09
to clo...@googlegroups.com
I develop Clojuratica.

Kyle---I had no idea it works with Player. That's cool and interesting.

Patrick---If you're doing straight-up numerical matrix algebra and require the greatest possible performance you'll probably do best with Parallel Colt. There's no time spent on data-type conversion and it's really fast. I haven't used it much, but it looks like it has a nice collection of fast array data types, solvers, optimization routines, etc.

If you think you'll be wanting anything more---symbolic matrix algebra, more diverse kinds of optimization, integration, ODEs, graphics, graph theory, etc.---Clojuratica might be worth using. I built it because I really like the cohesiveness of Mathematica. It's not just a library or set of routines, but a whole system that integrates beautifully with itself and is growing at a fast clip. Its functionality is almost a strict superset of Parallel Colt's. I program as much in Mathematica as Clojure and it feels just as expressive: it's functional and all (too bad it doesn't have persistent immutable data structures).

Clojuratica has to translate between Java and Mathematica so there's some performance penalty. It's pretty fast, however. I'm working on a new release that cuts the translation time significantly for purely numeric vectors and matrices. The new version can send a million-element vector/matrix to Mathematica in about a second, receive it into a lazy-seq in about twice that, and fully parse it into a realized lazy-seq in about five seconds on my old dual-core ThinkPad. Once the data is in Mathematica you have all the goodness of BLAS and LAPACK and whatever else Mathematica uses under the hood.

Joonas Pulakka

unread,
Oct 6, 2009, 6:28:28 AM10/6/09
to Clojure
Apache Commons Math 2.0 was released recently. I'm not sure how it
measures as high performance data cruncher - rather, it's a broad
collection of useful functions - but maybe worth a look anyway:
http://commons.apache.org/math/

Best Regards,
Joonas

CuppoJava

unread,
Oct 6, 2009, 2:14:50 PM10/6/09
to Clojure
Thanks for all the suggestions!
I'm currently interested most in Parallel Colt as interfaced with
Incanter, as it provides me a minimal barrier to entry to get some
initial hacking done first. After that I might switch to Clojuratica
when I need the additional functionality.

Just a quick question about Incanter: Are there any built-in functions
to do 1d and 2d convolution? or do I have to write those myself?

Thanks
-Patrick

liebke

unread,
Oct 7, 2009, 7:19:57 AM10/7/09
to Clojure
Hi Patrick,

Unfortunately, Incanter doesn't have any convolution functions, and
I'm not sure Parallel Colt does either. So I think you'll need to roll
your own.

You can find the Incanter API docs here: http://incanter.org/docs/api/
and the Parallel Colt API docs here: http://incanter.org/docs/parallelcolt/api/

Good luck,
David
Reply all
Reply to author
Forward
0 new messages