An easy-to-use but powerful and fast machine learning library for Java

View project onGitHub


Ask questions and contribute

Come say "Hi!" on our Discussion Forum, or improve QuickML and submit a pull request through GitHub. What to help? Take a look at our open issues and see if there is anything you can tackle, fork our code, then submit a pull request.

Coverity Scan Build Status


Documentation of QuickML is currently lagging significantly behind functionality, but the API is fairly well defined and should be mostly self-explanatory using the examples below as a starting point, just start poking around the source code. You can also improve this site by editing this file.

Please also note that the QuickML API remains subject to change, and will continue to do so until 1.0 (although, of course, we will only make such changes if we're convinced they're necessary to make the API as good as it can be.

How to use


Add the following repository to your Maven pom.xml file:

  <name>Sanity's Maven repository on GitHub</name>
Add the following repository to your Maven pom.xml file:

Build a simple predictive model

Here we train a random forest on the well-known Fisher Iris dataset, which is included with QuickML for your convenience. We then generate a prediction for a particular set of input attributes:

import quickml.supervised.classifier.randomForest.RandomForest;
import quickml.supervised.classifier.randomForest.RandomForestBuilder;
// ...
final List<Instance<Map<String, Serializable>>> irisDataset = Benchmarks.loadIrisDataset();
final RandomForest randomForest = new RandomForestBuilder().buildPredictiveModel(irisDataset);
Map<String, Serializable> attributes = Maps.newHashMap();
attributes.put("sepal-length", 5.84);
attributes.put("sepal-width", 3.05);
attributes.put("petal-length", 3.76);
attributes.put("petal-width", 1.2);
System.out.println("Prediction: " + randomForest.getProbability(attributes, "Iris-virginica"));


QuickML was initially created by Ian Clarke, and has had significant contributions by Alex Hawk and Chris Reeves of OneSpot.