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, toString
deleteContent, deleteNode, getAssociateList, getRoot, insertNode, isEmpty, makeEmpty, pathToString, prunedRules, pruningCriterions, removeAtChild, removeAtList, removeAtSibling, reportSubtreeCount, rulePremise, search, setInstancesNoClass, setInstancesOnlyClass, sortItemSet, updateHeight
public void insertContent(CrNode node, weka.core.FastVector input)
insertContent
in class JCBAPruning
node
- 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 JCBAPruning
premises
- the premisesconsequences
- the consequencesconfidences
- the metricesjava.lang.Exception
- throws exception is preprocessing is not possible.public void prune()
prune
in class JCBAPruning
public void setDefaultClass()
setDefaultClass
in class CrTree
public int getDefaultClass()
getDefaultClass
in class CrTree
public java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class JCBAPruning
public java.util.Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class JCBAPruning
public 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.OptionHandler
setOptions
in class JCBAPruning
options
- 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 JCBAPruning
public int numPrunedRules()
numPrunedRules
in class JCBAPruning
public int numClassRules()
numClassRules
in class JCBAPruning