16
$\begingroup$

I am taking a graduate course in Applied Statistics that uses the following textbook (to give you a feel for the level of the material being covered): Statistical Concepts and Methods, by G. K. Bhattacharyya and R. A. Johnson.

The Professor requires us to use SAS for the homeworks.

My question is that: is there a Java library(ies), that can be used instead of SAS for problems typically seen in such classes.

I am currently trying to make do with Apache Math Commons and though I am impressed with the library (it's ease of use and understandability) it seems to lack even simple things such as the ability to draw histograms (thinking of combining it with a charting library).

I have looked at Colt, but my initial interest died down pretty quickly.

Would appreciate any input -- and I've looked at similar questions on Stackoverflow but have not found anything compelling.

NOTE: I am aware of R, SciPy and Octave and java libraries that make calls to them -- I am looking for a Java native library or set of libraries that can together provide the features I'm looking for.

NOTE: The topics covered in such a class typically include: one-samle and two-sample tests and confidence intervals for means and medians, descriptive statistics, goodness-of-fit tests, one- and two-way ANOVA, simultaneous inference, testing variances, regression analysis, and categorical data analysis.

$\endgroup$
5
  • 2
    $\begingroup$ Have you considered R? $\endgroup$
    – RioRaider
    Sep 18, 2012 at 1:49
  • $\begingroup$ Hi, thanks for the note, I am looking for a library that is almost entirely in Java. So I am aware of R, SciPy and Octave and java libraries that make calls to them -- I'll edit the question to reflect this. Thanks. $\endgroup$ Sep 18, 2012 at 1:59
  • $\begingroup$ you metioned that "I am aware of R, SciPy and Octave and java libraries that make calls to them ". Can you please tell me that how will you call code written in "R statistics software "using Java? $\endgroup$ Jun 3, 2013 at 7:21
  • 5
    $\begingroup$ Why is it you want to use a Java library for basic statistical tests? $\endgroup$
    – Underminer
    Jan 17, 2014 at 17:54
  • 3
    $\begingroup$ @Underminer asks the right question here. Doing statistics in Java is like using a hammer for screws. With enough determination and brute force you surely can get the screw in place, but not in a very elegant or efficient way. You will likely end up with a damaged screw and painful fingers. $\endgroup$ Jan 17, 2014 at 20:56

5 Answers 5

11
$\begingroup$

When I am forced to use java for basic statistics, apache commons math is the way to go. For plots, I use and recommend JFreeChart. The latter is widely spread, so stackoverflow even has a populated tag for it.

Edit

If one looks for a suite, then maybe Deducer is an option. The GUI is based on JGR meanwhile the statistical parts are called in R. It seems to be extendable both via R and java. One could e.g. skip the calls to the Rengine but call referenced java libraries instead. But I admit, I did not try it yet.

As far as I have understood the OP, the optimum would be something like Rapidminer for Statistics, since Rapidminer is a pure java framework which supports GUI access (including visualizations), usage as library and custom plugin development. To the best of my knowledge, something like that for statistics does not exist. I do not recommend Rapidminer for that particular task, because to the best of my knowledge it only includes the most basic statistical tests. The visualizations have been extended lately, but I cannot estimate how customizable they are now.

$\endgroup$
2
  • $\begingroup$ Hi, that's kind of what I'm attempting to do, wish there was a more comprehensive suite. $\endgroup$ Sep 18, 2012 at 18:55
  • $\begingroup$ @user1172468 I have updated my answer $\endgroup$
    – steffen
    Sep 19, 2012 at 6:45
4
$\begingroup$

Check out Suan Shu: NumericalMethod.com. It is not free in general, but it is free for academic use.

$\endgroup$
5
  • $\begingroup$ This isn't really an answer to the OP's question. It is more of a comment. Would you mind expanding it to make it more of an answer? Alternatively, we can convert it into a comment for you. $\endgroup$ Jan 17, 2014 at 17:54
  • $\begingroup$ Perhaps you could expand on why it's not an answer. He's looking for a java library and I pointed him to one that has the majority of features he's looking for. $\endgroup$
    – user765195
    Jan 19, 2014 at 0:46
  • $\begingroup$ You're right, this situation is a little more ambiguous than the standard situation. Nonetheless, this is essentially a link only answer. SE thinks of those as comments rather than answers. You have enough reputation to have provided this as a comment. Because merely a link is sort of an answer here & since it had an upvote, I didn't flag it for conversion to a comment, but it might be nice if you could add a little to it. If you can't, & choose not to make it a comment, I respect your decision, that's why I simply left you a note. $\endgroup$ Jan 19, 2014 at 0:55
  • $\begingroup$ It does not seem free for academic use. $\endgroup$
    – kosmos
    Nov 15, 2016 at 0:25
  • $\begingroup$ Unfortunately, not anymore apparently, but a student version still seems available for $100. $\endgroup$
    – user765195
    Nov 15, 2016 at 17:37
3
$\begingroup$

Similar to steffen's suggestion of RapidMiner, you might want to consider Weka. It may be geared more specifically to machine learning than you are hoping for though. It has lots of algorithms for tasks like clustering, classification, and regression. Weka has a GUI, but it can also be used as a software library as well. I've seen histograms in the GUI but I'm not sure if it's easy to reuse them through the library or not.

$\endgroup$
1
  • $\begingroup$ Hi thanks for the response, I was really thinking of material covered in a Grad Statistics course: Topics include one- and two-sample tests and confidence intervals for means and medians, descriptive statistics, goodness-of-fit tests, one- and two-way ANOVA, simultaneous inference, testing variances, regression analysis, and categorical data analysis. $\endgroup$ Sep 19, 2012 at 17:31
2
$\begingroup$

DataMelt computing environment has many Java statistical libraries almost for any topic. You can use it using Jython as advocated on the web site, but I use it with Java and Groovy.

I can say more: the DataMelt project covers the following statistical topics:

  • Random numbers
  • Most popular discrete and continues distributions
  • Descriptive statistical analysis
  • Data fit (linear and non-linear)
  • Various statistical tests
  • Histograms in 2D and 3D

Here is a non-linear regression example using log-likelihood approach to fit data with errors:

enter image description here

The package is free.

$\endgroup$
1
  • 3
    $\begingroup$ Welcome to the site, @Remi. This isn't really an answer to the OP's question. It is more of a comment. Please only use the "Your Answer" field to provide answers. I recognize it's frustrating, but you will be able to comment anywhere when your reputation >50. Alternatively, you could try to expand it to make it more of an answer. Since you are new here, you may want to read our tour page, which contains information for new users. $\endgroup$ Jan 17, 2014 at 17:51
1
$\begingroup$

Try http://www.roguewave.com/Portals/0/products/imsl-numerical-libraries/java-library/docs/5.0.1/api/overview-summary.html

It is well documented and provides a lot of useful statistical and mathematical functions. But unfortunately it is not open source. So if that does not bother you, then the library should be ok.

I do not know however, if it provides graphical output.

$\endgroup$
1
  • 1
    $\begingroup$ Hi, thanks for the link, do you know how it compares against Apache Commons Math. $\endgroup$ Sep 18, 2012 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.