The Weka data mining library makes available an extensive range of functionality, some of it hidden unless you delve into the API documentation. So, over the next few weeks, I intend to work through some of this documentation, and get a clearer picture of what is available and how to use it from jRuby. I am currently using the developer version 3.7, which you can find on the Weka website.I start by opening up the Weka documentation in a browser, and this reveals a number of packages, some with many subpackages. In alphabetical order, the main packages are:weka.associations: The items in this package are for learning association rules: such rules are relations between variables in the data. There are two interfaces and several classes. The classes include standard algorithms such as APriori. weka.classifiers: The items in this package are for constructing classification models: these are models which predict the value of a specified attribute from the remaining attributes. This package is quite complex, and has several layers to it. There are four interfaces and a number of classes. The more familiar classifiers, such as J48 or LibSVM, are subclasses of the abstract class Classifier, and are grouped within subpackages. Some of the other classes, such as EnsembleLibrary, are for handling groups of classifiers.The subpackages bring together the main groups of classificaion algorithms, such as bayes, functions, trees etc. These subpackages contain classes with concrete implementations of classification models, such as NaiveBayes and J48. weka.clusterers: This package contains concrete classes for a number of standard clustering algorithms, including Cobweb and SimpleKMeans: a clustering algorithm groups instances of data based on their similarity. Also, some interfaces and abstract classes are present for organising the clustering algorithms into groups, such as those which can estimate density for an instance.
weka.core:
This package contains many 'day-to-day' classes such as Instance and Instances. There are also classes such as EuclideanDistance and EditDistance which compute distances between instances or strings, respectively. MathematicalExpression is a class for evaluating strings containing expressions adhering to a simple grammar. There are over 70 classes in total, so plenty to explore.
weka.datagenerators and
weka.estimators:
These packages provide ways to generate and estimate data based on distributions of values.
weka.experiment:
This package contains some interesting 'organisational' interfaces and classes. For example, the 'ResultsProducer' is an interface for objects which work with different randomisations of a dataset. The CrossValidationResultProducer is an implementation of this interface which organises a run of n-fold cross validation.
A collection of classes starting 'Result' provide ways of outputting data in standard formats, such as for GnuPlot, HTML etc.
This is the kind of material I tend to start coding myself, and perhaps I could save some time by using this package instead!
weka.filters:
Filters are techniques for modifying the dataset, either by modifying the number or balance of instances, or by altering the values of attributes themselves. Some useful examples include PrincipalComponents, which performs a transformation of the data, and RandomProjection, which reduces the dimensionality of data.
weka.gui:
Many of these classes are for the Weka graphical environment, but some components can be usefully reused in our own GUIs. These include visualisations of trees and other datatypes, which are under subpackages such as treeviewer and visualize.