public class JCBA extends CarClassifier implements weka.core.OptionHandler, weka.core.AdditionalMeasureProducer, weka.core.CapabilitiesHandler, weka.core.TechnicalInformationHandler
-A Class Association Rule Miner String
Class Association Rule Miner String should contain the full class name of a
scheme included for selection followed by options to the Class Association
Rule Miner.
-C confidence value
Sets the confidence value for the optional pessimistic-error-rate-based
pruning (default 0.25).
-E
If set the optional pessimistic-error-rate-based pruning is enabled.
-N
If set the optional and the obligatory pruning step are disabled. Classifier
behaves like a standard decision list classifier.
-V
If set the mined rule set is printed out as well.
Constructor and Description |
---|
JCBA() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances newInstances)
Generates the classifier.
|
java.lang.String |
carMinerTipText()
Gets the tipText for this option.
|
java.lang.String |
CBATipText()
Gets the tipText for the specified option.
|
java.lang.String |
CFTipText()
Gets the tipText for the specified option.
|
double |
classifyInstance(weka.core.Instance instance)
Classifies an instance
|
double[] |
distributionForInstance(weka.core.Instance newInstance)
Returns the class distribution for an instance
|
java.util.Enumeration |
enumerateMeasures()
Lists all additional statistics that are available
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the base associator.
|
weka.associations.CARuleMiner |
getCarMiner()
Gets the class association rule miner
|
boolean |
getCBA()
Gets whether or not CBA or a standard decision list classifier is used
|
float |
getCF()
Gets the confidence value for pessimistic-error-rate-based pruning
|
double |
getMeasure(java.lang.String additionalMeasureName)
Gets the additional statistics
|
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
boolean |
getOptPruning()
Gets whether or not optional pruning is turned on
|
JCBAPruning |
getPrune()
Gets the pruning algorithm: JCBAPruning
|
java.lang.String |
getRevision()
Returns the revision string.
|
weka.core.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 |
getTreeOutput()
Gets whether or not the mined rule set is part of the output
|
java.lang.String |
globalInfo()
Gets a description of the JCBA algorithm
|
double |
intermediateClassificationForInstance(weka.core.Instance instance,
JCBAPruning tree,
weka.core.Instances instances)
Does the intermediate classification step during the CBA's obligatory
pruning
|
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options
|
static void |
main(java.lang.String[] argv)
Main method for testing this class.
|
double |
measureMiningTime()
Gets the mining time
|
double |
measureNumClassRules()
Gets the number of rules used for classification
|
double |
measureNumMinedRules()
Gets the number of mined rules
|
double |
measureNumPrunedRules()
Gets the number of rules after the optional pruning step
|
double |
measurePruningTime()
Gets the pruning time in seconds
|
java.lang.String |
optPruningTipText()
Gets the tipText for the specified option.
|
void |
setCarMiner(weka.associations.CARuleMiner assoc)
Sets the class association rule miner
|
void |
setCBA(boolean flag)
Sets whether or not CBA or a standard decision list classifier is used
|
void |
setCF(float value)
Sets the confidence value for pessimistic-error-rate-based pruning
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setOptPruning(boolean flag)
Sets optional pruning
|
void |
setTreeOutput(boolean flag)
Sets whether or not mined rule set is part of the output
|
java.lang.String |
toString()
Prints the rules
|
java.lang.String |
treeOutputTipText()
Gets the tipText for the specified option.
|
sortAttributes
batchSizeTipText, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.AbstractClassifier
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface weka.core.TechnicalInformationHandler
public java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.AbstractClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-A Class Association Rule Miner String
Class Association Rule Miner String should contain the full class name of a
scheme included for selection followed by options to the Class Association
Rule Miner.
-C confidence value
Sets the confidence value for the optional pessimistic-error-rate-based
pruning (default 0.25).
-E
If set the optional pessimistic-error-rate-based pruning is enabled.
-N
If set the optional and the obligatory pruning step are disabled.
Classifier behaves like a standard decision list classifier.
-V
If set the mined rule set is printed out as well.
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.AbstractClassifier
options
- the list of options as an array of stringsjava.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.classifiers.AbstractClassifier
public java.lang.String carMinerTipText()
public void setCarMiner(weka.associations.CARuleMiner assoc)
assoc
- the class association rule minerpublic weka.associations.CARuleMiner getCarMiner()
public JCBAPruning getPrune()
public java.lang.String optPruningTipText()
public void setOptPruning(boolean flag)
flag
- boolean flagpublic boolean getOptPruning()
public java.lang.String CFTipText()
public void setCF(float value)
value
- the confidence valuepublic float getCF()
public java.lang.String treeOutputTipText()
public void setTreeOutput(boolean flag)
flag
- boolean flagpublic boolean getTreeOutput()
public java.lang.String CBATipText()
public void setCBA(boolean flag)
flag
- true if CBA is used, false otherwisepublic boolean getCBA()
public void buildClassifier(weka.core.Instances newInstances) throws java.lang.Exception
buildClassifier
in interface weka.classifiers.Classifier
newInstances
- set of instances serving as training datajava.lang.Exception
- if the classifier has not been generated successfullypublic double classifyInstance(weka.core.Instance instance) throws java.lang.Exception
classifyInstance
in interface weka.classifiers.Classifier
classifyInstance
in class weka.classifiers.AbstractClassifier
instance
- the instancejava.lang.Exception
- exception if instance cannot be classifiedpublic double[] distributionForInstance(weka.core.Instance newInstance) throws java.lang.Exception
distributionForInstance
in interface weka.classifiers.Classifier
distributionForInstance
in class weka.classifiers.AbstractClassifier
newInstance
- the instancejava.lang.Exception
- exception if it cannot be calculatedpublic double intermediateClassificationForInstance(weka.core.Instance instance, JCBAPruning tree, weka.core.Instances instances) throws java.lang.Exception
instance
- the instance to classifiytree
- the actual CrTree with the actual rule setinstances
- the instancesjava.lang.Exception
- exception if instance cannot be classifiedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Enumeration enumerateMeasures()
enumerateMeasures
in interface weka.core.AdditionalMeasureProducer
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure
in interface weka.core.AdditionalMeasureProducer
additionalMeasureName
- the name of the additional measurepublic double measureMiningTime()
public double measurePruningTime()
public double measureNumMinedRules()
public double measureNumPrunedRules()
public double measureNumClassRules()
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public static void main(java.lang.String[] argv)
argv
- the options