public class PrecedencePruning extends JCBAPruning implements weka.core.OptionHandler, java.io.Serializable
-C the confidence value
The confidence value for the optional pessimistic-error-rate-based pruning
step (default: 0.25).
-N
If set no pessimistic-error-rate-based pruning is performed.
| Constructor and Description |
|---|
PrecedencePruning()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDefaultClass()
Gets the default class
|
java.lang.String[] |
getOptions()
Gets options
|
void |
insertContent(CrNode node,
weka.core.FastVector input)
Insert consequence to a node and updates the precedence list
|
java.util.Enumeration |
listOptions()
Lists options
|
int |
numClassRules()
Gets the number of classification rules
|
int |
numMinedRules()
Gets the number of mined rules
|
int |
numPrunedRules()
Gets the number of rules after the optional pessimistic-error.rate-based
pruning
|
void |
preprocess(java.util.ArrayList<java.lang.Object> premises,
java.util.ArrayList<java.lang.Object> consequences,
java.util.ArrayList<java.lang.Object> confidences)
Preprocesses a rule before it gets inserted into the tree.
|
void |
prune()
No pruning is perfomed (except of the optional pruning step in the
preprocessing method).
|
void |
setDefaultClass()
Sets the default class as the majority class label of all instances
|
void |
setNoPessPruning(boolean flag)
Sets pessimistic-error-rate-based pruning
|
void |
setOptions(java.lang.String[] options)
Sets options
|
java.lang.String |
toString(java.lang.String metricString,
int numMinedRules)
Outputs the CrTree
|
addErrs, calculateDefaultClass, calculateError, getClassValue, getPrecedenceList, getStopIndex, optPruning, pruneBeforeInsertion, resetOptions, setDefaultClass, setInstances, toStringdeleteContent, deleteNode, getAssociateList, getRoot, insertNode, isEmpty, makeEmpty, pathToString, prunedRules, pruningCriterions, removeAtChild, removeAtList, removeAtSibling, reportSubtreeCount, rulePremise, search, setInstancesNoClass, setInstancesOnlyClass, sortItemSet, updateHeightpublic void insertContent(CrNode node, weka.core.FastVector input)
insertContent in class JCBAPruningnode - the nodeinput - the consequence and additional measurespublic void preprocess(java.util.ArrayList<java.lang.Object> premises,
java.util.ArrayList<java.lang.Object> consequences,
java.util.ArrayList<java.lang.Object> confidences)
throws java.lang.Exception
preprocess in class JCBAPruningpremises - the premisesconsequences - the consequencesconfidences - the metricesjava.lang.Exception - throws exception is preprocessing is not possible.public void prune()
prune in class JCBAPruningpublic void setDefaultClass()
setDefaultClass in class CrTreepublic int getDefaultClass()
getDefaultClass in class CrTreepublic java.lang.String[] getOptions()
getOptions in interface weka.core.OptionHandlergetOptions in class JCBAPruningpublic java.util.Enumeration listOptions()
listOptions in interface weka.core.OptionHandlerlistOptions in class JCBAPruningpublic void setNoPessPruning(boolean flag)
flag - true, if no pessimistic-error-rate-based pruning should be
done, false otherwisepublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface weka.core.OptionHandlersetOptions in class JCBAPruningoptions - the optionsjava.lang.Exception - exception if options cannot be set.public java.lang.String toString(java.lang.String metricString,
int numMinedRules)
metricString - the metric used to mine class association rulespublic int numMinedRules()
numMinedRules in class JCBAPruningpublic int numPrunedRules()
numPrunedRules in class JCBAPruningpublic int numClassRules()
numClassRules in class JCBAPruning