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.
|
sortAttributesbatchSizeTipText, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacespublic weka.core.Capabilities getCapabilities()
getCapabilities in interface weka.classifiers.ClassifiergetCapabilities in interface weka.core.CapabilitiesHandlergetCapabilities in class weka.classifiers.AbstractClassifierpublic weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface weka.core.TechnicalInformationHandlerpublic java.lang.String globalInfo()
public java.util.Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class weka.classifiers.AbstractClassifierpublic 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.OptionHandlersetOptions in class weka.classifiers.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 weka.core.OptionHandlergetOptions in class weka.classifiers.AbstractClassifierpublic 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.ClassifiernewInstances - 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.ClassifierclassifyInstance in class weka.classifiers.AbstractClassifierinstance - 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.ClassifierdistributionForInstance in class weka.classifiers.AbstractClassifiernewInstance - 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.Objectpublic java.util.Enumeration enumerateMeasures()
enumerateMeasures in interface weka.core.AdditionalMeasureProducerpublic double getMeasure(java.lang.String additionalMeasureName)
getMeasure in interface weka.core.AdditionalMeasureProduceradditionalMeasureName - 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.RevisionHandlergetRevision in class weka.classifiers.AbstractClassifierpublic static void main(java.lang.String[] argv)
argv - the options