The PBC API
The PBC application
programming interface:
The PBC API enables
the user to integrate any algorithm relying on univariate splits with no
limit
in the fan-out of
the nodes (either binary or multi-way). You just have to do the following
steps:
-
Implement a class 'MyAlgo1'
that extends the abstract class AlgoClassifier.
The nessecary information about data in a node is provided by methods of
the
class Node.
-
Compile this class with
the classpath containing the file/the directory of 'pbc.jar'.
-
Update the 'execApplication.bat'
such that the classpath also contains your file 'MyAlgo1'.
-
Run PBC and enjoy the
visualization of your own classifier.
Additional notes:
-
Your implemented algorithm
should look like:
import data.Node;
import algo.AlgoClassifier;
import data.Dataset;
import data.CategoryArray;
import java.util.Vector;
public class MyAlgo1
extends AlgoClassifier {
public void
calculateAttribute(Node n, Vector vAttributes) {...}
public int[]
sortCategories(CategoryArray cat, Dataset[] sets, int nAttributIndex) {...}
public String
getName() {...}
}
-
The method sortCategories()
{...} is just for categorical attributes invoked.
-
You may implement several
algorithms. Their class names must be: 'MyAlgo1', 'MyAlgo2', 'MyAlgo3',...