|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.associations.classification.PruneCAR
weka.associations.classification.CrTree
weka.associations.classification.JCBAPruning
weka.associations.classification.PrecedencePruning
public class PrecedencePruning
Class that allows a simple pessimistic-error-rate based pruning or omits pruning at all and just builds a CrTree with all mined rules. In addition to the CrTree a list containing information about the rule sorting is maintained (precedence list). This list allows investigating the sort oder of rules induced by the mining algorithm even when no pruning is performed. The Tree Structure is described in: W. Li, J. Han, J.Pei: CMAR: Accurate and Efficient Classification Based on Multiple Class-Association Rules. In ICDM'01:369-376,2001. The optional pessimistic-error-rate-based pruning step is described in: B. Liu, W. Hsu, Y. Ma: Integrating Classification and Association Rule Mining. In KDD'98:80-86,1998. Valid options are:
-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 Summary | |
---|---|
PrecedencePruning()
Constructor |
Method Summary | |
---|---|
int |
getDefaultClass()
Gets the default class |
java.lang.String[] |
getOptions()
Gets options |
void |
insertContent(CrNode node,
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(FastVector premises,
FastVector consequences,
FastVector 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 |
Methods inherited from class weka.associations.classification.JCBAPruning |
---|
addErrs, calculateDefaultClass, calculateError, getClassValue, getPrecedenceList, getStopIndex, optPruning, pruneBeforeInsertion, resetOptions, setDefaultClass, setInstances, toString |
Methods inherited from class weka.associations.classification.CrTree |
---|
deleteContent, deleteNode, getAssociateList, getRoot, insertNode, isEmpty, makeEmpty, pathToString, prunedRules, pruningCriterions, removeAtChild, removeAtList, removeAtSibling, reportSubtreeCount, rulePremise, search, setInstancesNoClass, setInstancesOnlyClass, sortItemSet, updateHeight |
Methods inherited from class weka.associations.classification.PruneCAR |
---|
forName |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrecedencePruning()
Method Detail |
---|
public void insertContent(CrNode node, FastVector input)
insertContent
in class JCBAPruning
node
- the nodeinput
- the consequence and additional measurespublic void preprocess(FastVector premises, FastVector consequences, FastVector confidences) throws java.lang.Exception
preprocess
in class JCBAPruning
premises
- the premisesconsequences
- the consequencesconfidences
- the metrices
java.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 OptionHandler
getOptions
in class JCBAPruning
public java.util.Enumeration listOptions()
listOptions
in interface 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 OptionHandler
setOptions
in class JCBAPruning
options
- the options
java.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 rules
public int numMinedRules()
numMinedRules
in class JCBAPruning
public int numPrunedRules()
numPrunedRules
in class JCBAPruning
public int numClassRules()
numClassRules
in class JCBAPruning
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |