Introduction This tutorial shows how to use Weka (build feature vector, train a classifier, test a classifier, use a classifier) directly from Java code. It is not intended to replace the Explorer/Experimenter GUI that offer the visualization and engineering tools required to set up and debug machine learning experiments. Weka’s automation is useful to embed a classifier in a larger program and t