views:

1795

answers:

5

I was wondering if there is a good statistical library for Java. I used to use colt from CERN but it does not provide a good weighted sampling. So I usually use MATLAB Java Builder and export everything to Java afterward. Any thoughts or insights?

+4  A: 

What about the Apache Commons Math Library? It has a statistics package.

cletus
A: 

you might want to look into Octave -- I don't have much experience with it, it's "kind of" compatible with MATLAB and I believe it has the ability to be called from Java. (it's GPL so be sure to check whether your use of it through Java imposes GPL-ness onto your application. I would guess not but do your due diligence.)

Jason S
+3  A: 

I asked a similar question over here. Some of the leading contenders in those responses include Apache Commons Math, Java Numerics (NIST), colt, and MATLIB. Currently, we're using Apache Commons Math but our penetration there isn't very deep (and we are almost certainly not using it in the same way as you would).

Bob Cross
A: 

After working on different libraries I am still using MATLAB as my main statistical library and just convert everything to JAVA

Mark
+3  A: 

You can also use R and call it from Java with JRI. See this related post.

The downside is the learning curve, but it's well worth the effort in my opinion. As the wikipedia article states: "The R language has become a de facto standard among statisticians for the development of statistical software, and is widely used for statistical software development and data analysis."

You can also follow along with the SO postings on R. See this post as an example for learning the language.

Shane