Feature Selection Package - Algorithms - Classifiers - J48
Description
The J48 classifier is Weka's implementation of the infamous C4.5 decision tree
classifier, which is a classification algorithm based on ID3 that classifies using information entropy.
Usage
Method Signature:
[a] = J48(args, trainX, trainY
, testX, testY)
Output:
a:
The output will be the same struct you passed in for 'args', but with the
tree, the vital features, and accuracy appended as fields. They will
be named 'classifier', 'features', and 'tree_accuracy', respectively.
Input:
args:
This is a struct of arguments you want J48 to use while classifying. A list of
the parameters and their default values is listed below. Note that if you want to use
the defaults, simply pass a non-struct variable in and the default struct will be used.
- unpruned=0 -- set to 1 to use unpruned trees
- confidence=0.25 -- confidence threshold for pruning
- number=2 -- minimum number of instances per leaf
- reduced_error=0 -- set to 1 to use reduced error pruning
- folds=3 -- number of folds for reduced error pruning
- binary=0 -- set to 1 to use binary split for nominal attributes
- laplace=0 -- set to 1 if laplace smoothing technique is used for
predicted probabilities
- raising=1 -- set to 0 if subtree raising should not be performed
- cleanup=1 -- set to 0 if no cleaning up after the tree has been
built.
trainX: training data, each row is an instance.
trainY: training data, each column is a class.
testX: testing data, each row is an instance.
testY: testing data, each column is a class.
Code Example
% Using the wine.dat data set, which can be found at
% [fspackage_location]/classifiers/knn/wine.mat
% Using the default settings
j48(0,X,Y,X,Y)
Paper
BibTex entry for:
Ross Quinlan (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers, San Mateo, CA.
@book{Quinlan1993,
address = {San Mateo, CA},
author = {Ross Quinlan},
publisher = {Morgan Kaufmann Publishers},
title = {C4.5: Programs for Machine Learning},
year = {1993}
}