public class PART extends AbstractClassifier implements OptionHandler, WeightedInstancesHandler, Summarizable, AdditionalMeasureProducer, TechnicalInformationHandler
@inproceedings{Frank1998,
author = {Eibe Frank and Ian H. Witten},
booktitle = {Fifteenth International Conference on Machine Learning},
editor = {J. Shavlik},
pages = {144-151},
publisher = {Morgan Kaufmann},
title = {Generating Accurate Rule Sets Without Global Optimization},
year = {1998},
PS = {http://www.cs.waikato.ac.nz/\~eibe/pubs/ML98-57.ps.gz}
}
Valid options are:
-C <pruning confidence> Set confidence threshold for pruning. (default 0.25)
-M <minimum number of objects> Set minimum number of objects per leaf. (default 2)
-R Use reduced error pruning.
-N <number of folds> Set number of folds for reduced error pruning. One fold is used as pruning set. (default 3)
-B Use binary splits only.
-U Generate unpruned decision list.
-J Do not use MDL correction for info gain on numeric attributes.
-Q <seed> Seed for random data shuffling (default 1).
-doNotMakeSplitPointActualValue Do not make split point actual value.
BATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULT| Constructor and Description |
|---|
PART() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
binarySplitsTipText()
Returns the tip text for this property
|
void |
buildClassifier(Instances instances)
Generates the classifier.
|
double |
classifyInstance(Instance instance)
Classifies an instance.
|
java.lang.String |
confidenceFactorTipText()
Returns the tip text for this property
|
double[] |
distributionForInstance(Instance instance)
Returns class probabilities for an instance.
|
java.lang.String |
doNotMakeSplitPointActualValueTipText()
Returns the tip text for this property
|
java.util.Enumeration<java.lang.String> |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
boolean |
getBinarySplits()
Get the value of binarySplits.
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
float |
getConfidenceFactor()
Get the value of CF.
|
boolean |
getDoNotMakeSplitPointActualValue()
Gets the value of doNotMakeSplitPointActualValue.
|
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
|
int |
getMinNumObj()
Get the value of minNumObj.
|
int |
getNumFolds()
Get the value of numFolds.
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
boolean |
getReducedErrorPruning()
Get the value of reducedErrorPruning.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSeed()
Get the value of Seed.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing detailed
information about the technical background of this class, e.g., paper
reference or book this class is based on.
|
boolean |
getUnpruned()
Get the value of unpruned.
|
boolean |
getUseMDLcorrection()
Get the value of useMDLcorrection.
|
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
double |
measureNumRules()
Return the number of rules.
|
java.lang.String |
minNumObjTipText()
Returns the tip text for this property
|
java.lang.String |
numFoldsTipText()
Returns the tip text for this property
|
java.lang.String |
reducedErrorPruningTipText()
Returns the tip text for this property
|
java.lang.String |
seedTipText()
Returns the tip text for this property
|
void |
setBinarySplits(boolean v)
Set the value of binarySplits.
|
void |
setConfidenceFactor(float v)
Set the value of CF.
|
void |
setDoNotMakeSplitPointActualValue(boolean m_doNotMakeSplitPointActualValue)
Sets the value of doNotMakeSplitPointActualValue.
|
void |
setMinNumObj(int v)
Set the value of minNumObj.
|
void |
setNumFolds(int v)
Set the value of numFolds.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setReducedErrorPruning(boolean v)
Set the value of reducedErrorPruning.
|
void |
setSeed(int newSeed)
Set the value of Seed.
|
void |
setUnpruned(boolean newunpruned)
Set the value of unpruned.
|
void |
setUseMDLcorrection(boolean newuseMDLcorrection)
Set the value of useMDLcorrection.
|
java.lang.String |
toString()
Returns a description of the classifier
|
java.lang.String |
toSummaryString()
Returns a superconcise version of the model
|
java.lang.String |
unprunedTipText()
Returns the tip text for this property
|
java.lang.String |
useMDLcorrectionTipText()
Returns the tip text for this property
|
batchSizeTipText, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacespublic java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilitiespublic void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier in interface Classifierinstances - the data to train withjava.lang.Exception - if classifier can't be built successfullypublic double classifyInstance(Instance instance) throws java.lang.Exception
classifyInstance in interface ClassifierclassifyInstance in class AbstractClassifierinstance - the instance to classifyjava.lang.Exception - if instance can't be classified successfullypublic final double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to get the distribution forjava.lang.Exception - if the distribution can't be computed successfullypublic java.util.Enumeration<Option> listOptions()
-C confidence
Set confidence threshold for pruning. (Default: 0.25)
-M number
Set minimum number of instances per leaf. (Default: 2)
-R
Use reduced error pruning.
-N number
Set number of folds for reduced error pruning. One fold is used as the
pruning set. (Default: 3)
-B
Use binary splits for nominal attributes.
-U
Generate unpruned decision list.
-Q
The seed for reduced-error pruning.
listOptions in interface OptionHandlerlistOptions in class AbstractClassifierpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-C <pruning confidence> Set confidence threshold for pruning. (default 0.25)
-M <minimum number of objects> Set minimum number of objects per leaf. (default 2)
-R Use reduced error pruning.
-N <number of folds> Set number of folds for reduced error pruning. One fold is used as pruning set. (default 3)
-B Use binary splits only.
-U Generate unpruned decision list.
-J Do not use MDL correction for info gain on numeric attributes.
-Q <seed> Seed for random data shuffling (default 1).
-doNotMakeSplitPointActualValue Do not make split point actual value.
setOptions in interface OptionHandlersetOptions in class AbstractClassifieroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class AbstractClassifierpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toSummaryString()
toSummaryString in interface Summarizablepublic double measureNumRules()
public java.util.Enumeration<java.lang.String> enumerateMeasures()
enumerateMeasures in interface AdditionalMeasureProducerpublic double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface AdditionalMeasureProduceradditionalMeasureName - the name of the measure to query for its valuejava.lang.IllegalArgumentException - if the named measure is not supportedpublic java.lang.String confidenceFactorTipText()
public float getConfidenceFactor()
public void setConfidenceFactor(float v)
v - Value to assign to CF.public java.lang.String minNumObjTipText()
public int getMinNumObj()
public void setMinNumObj(int v)
v - Value to assign to minNumObj.public java.lang.String reducedErrorPruningTipText()
public boolean getReducedErrorPruning()
public void setReducedErrorPruning(boolean v)
v - Value to assign to reducedErrorPruning.public java.lang.String unprunedTipText()
public boolean getUnpruned()
public void setUnpruned(boolean newunpruned)
newunpruned - Value to assign to unpruned.public java.lang.String useMDLcorrectionTipText()
public boolean getUseMDLcorrection()
public void setUseMDLcorrection(boolean newuseMDLcorrection)
newuseMDLcorrection - Value to assign to useMDLcorrection.public java.lang.String numFoldsTipText()
public int getNumFolds()
public void setNumFolds(int v)
v - Value to assign to numFolds.public java.lang.String seedTipText()
public int getSeed()
public void setSeed(int newSeed)
newSeed - Value to assign to Seed.public java.lang.String binarySplitsTipText()
public boolean getBinarySplits()
public void setBinarySplits(boolean v)
v - Value to assign to binarySplits.public java.lang.String doNotMakeSplitPointActualValueTipText()
public boolean getDoNotMakeSplitPointActualValue()
public void setDoNotMakeSplitPointActualValue(boolean m_doNotMakeSplitPointActualValue)
m_doNotMakeSplitPointActualValue - the value to setpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(java.lang.String[] argv)
argv - command line options