Congrats on the release. I can think of at least one big organization I've talked to that was chomping at the bit to try pandas but had too much of an existing commitment to Scala to take the Python plunge. [Disclaimer: brother of OP]
Breeze is more targeted to NLP and machine learning. Saddle draws heavily on the design of pandas (python library) to provide data structures enabling "alignment-free programming". Saddle outsources nearly all its linear algebra and numerics capabilities.
As one of the colleagues of the author of this library, I can give my semi-biased opinion. To be honest, having worked in a previous life with Numpy+SciPy, the appearance of Saddle in our tech stack made the reasoning of complex numerical code easier. I'd suggest using it not just for it's performance (quite impressive for a JVM based library) but more for it's clear API. Expressible code (clean code) is debugged faster and maintained with less overhead. This library will let your code become expressive as a numeric library can be without sacrificing some of the nicer language features you've come to rely upon (map, flatMap, etc.)
Most of my colleagues do data analysis in Python given Numpy+SciPy. I like Python, but if possible, I'd rather do as much of my development in a single language, and I prefer Scala.
This library certainly does not replicate the extensive functionality offered in Python for data analysis, but it does have the potential to seed Scala development. I for one will be perusing the code this weekend, and picking an avenue for subsequent exploration.
It took me a while to realize there were implicit conversions in the companion objects that are necessary in order to get useful functionality out of the data structures.
It might be worth adding an example to make it a bit more explicit in the documentation, such as:
I was sort of sad to learn earlier this year that the scalala project had become inactive, and when a friend pointed me at Breeze, the first thing that concerned me was that it seemed to "do ALL the things!", rolling in a bunch of other functionality along with a scalala revamp. What I really wanted was an elegant, fast, well written numerical computing library in Scala, and this seems to be it. This is great. Now all we need is to be able to tell this to use GPU hardware acceleration under the hood for things like FFTs and we're set!
The more I look into this, the better it looks. In particular, I appreciate that you used good existing solutions on the backend (EJML, Apache commons math, etc) where appropriate.
For me at least, sparse vector support means you can do elementwise operations (on the non-sparse elements) and in particular linear algebra like vector dot-products and matrix-vector multiply.
25 comments
[ 3.2 ms ] story [ 77.3 ms ] threadIs there something like this for Clojure? I guess I'll have to pick up scala too. Coursera here I come.
Probably Incanter which uses the Parallel Colt Java library - http://incanter.org/ | https://sites.google.com/site/piotrwendykier/software/parall...
Most of my colleagues do data analysis in Python given Numpy+SciPy. I like Python, but if possible, I'd rather do as much of my development in a single language, and I prefer Scala.
This library certainly does not replicate the extensive functionality offered in Python for data analysis, but it does have the potential to seed Scala development. I for one will be perusing the code this weekend, and picking an avenue for subsequent exploration.
Do we have performance information yet, even on some basic, common use cases?
Also, the docs mention EJML as the backend for Saddle's data structures--do you have any thoughts on using EJML?
Consider the following in Saddle:
This clocks in at 19ms on my machine after Hotspot kicks in.The equivalent pandas:
10 loops, best of 3: 37.7 ms per loopWhile it's maybe 2x-4x slower than JNI wrapped ATLAS or MKL, for the cases I deal with, it just doesn't matter vs ease of use.
That said, it's LGPL, so I made it easy to swap out for other matrix libraries if you need.
It might be worth adding an example to make it a bit more explicit in the documentation, such as:
Other than that, it looks pretty cool, I'll go use it right now. :)Edit: Formatting.