Python is plenty of ML libraries (like the great scikit-learn). Is there any good for java/scala, containing many algos (regression, classification, clustering, cross-validation, feature processing), stable & maintained and able to deal with massive dataset?

I've just found Mahout, Breeze/Nak, and Weka, but they're not looking as great as Python ones.

Additionally, if there's no equivalent, how can I efficiently connect java code with Python?

  • $\begingroup$ Perhaps consider adding a little detail about what makes scikit-learn great compared to Mahout &c. $\endgroup$ Commented Jun 13, 2014 at 13:05
  • $\begingroup$ Lots of algorithm for classification, regression, feature selection, feature reduction, and so on. Additionally, it has a big community of contributors and support $\endgroup$
    – boskaiolo
    Commented Jun 13, 2014 at 14:15
  • $\begingroup$ Could you be a bit more specific about what you're trying to achieve? A common way to "connect" java and python is to use jython, jython.org. $\endgroup$
    – sandris
    Commented Jul 17, 2014 at 7:56
  • $\begingroup$ Check out mloss.org $\endgroup$ Commented Aug 28, 2014 at 7:25

3 Answers 3


You may find helpful this extensive curated list of ML libraries, frameworks and software tools. In particular, it contains resources that you're looking for - ML lists for Java and for Scala.

  • 8
    $\begingroup$ i am the owner of that list -i would like to add that it is updated regularly - with pull requests coming in every week $\endgroup$ Commented Jan 16, 2015 at 1:35
  • $\begingroup$ @JosephMisiti: Thank you for the update. It's good to know - keep it up. $\endgroup$ Commented Jan 16, 2015 at 3:06

Apache Spark and specifically its component MLlib looks like exactly what you are looking for. MLlib contains implementations for classification, regression, dimensionality reduction etc. You can program in Scala,Java and Python.

Its basically a very fast distributed computing framework that can be run in an Hadoop cluster. For development purposes, you can easily run it in standalone mode (without Hadoop) on your local machine too.

Check out the MLlib guide here : https://spark.apache.org/docs/latest/mllib-guide.html


Hava a look at JavaML (http://java-ml.sourceforge.net/) and Encog (http://www.heatonresearch.com/encog). The latter focuses rather on Neural Networks than on many algorithms.

Also, weka might not have very friendly java API (because, first of all, it's a GUI application, not a library), but when you get used to it, you start appreciating how many things are implemented there.

I have used successfully all of them.


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