public abstract class PruneCAR
extends java.lang.Object
implements weka.core.OptionHandler, java.io.Serializable
| Constructor and Description |
|---|
PruneCAR() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
deleteContent(CrNode node,
int index)
Deletes a consequence from a node
|
static PruneCAR |
forName(java.lang.String pruningName,
java.lang.String[] options)
Creates a new instance of a PruneCAR given it's class name and (optional)
arguments to pass to it's setOptions method.
|
abstract void |
insertContent(CrNode node,
weka.core.FastVector input)
Inserts a consequence and the according interestingness measures into a
node
|
abstract boolean |
isEmpty()
Tests if there are rules
|
abstract void |
preprocess(java.util.ArrayList<java.lang.Object> premises,
java.util.ArrayList<java.lang.Object> consequences,
java.util.ArrayList<java.lang.Object> confidences)
Preprocesses rules before inserting them into the structure
|
abstract void |
prune()
Prunes rules out of tree
|
abstract void |
pruneBeforeInsertion(weka.core.FastVector prem,
weka.core.FastVector cons)
Pruning step before a rule is inserted into the structure
|
abstract int |
prunedRules()
Gets the number of pruned rules.
|
abstract weka.core.FastVector |
pruningCriterions(weka.core.FastVector input)
FastVector defining additional pruning criteria
|
abstract void |
setInstancesNoClass(weka.core.Instances instances)
Sets the instances without the class attribute
|
abstract void |
setInstancesOnlyClass(weka.core.Instances instances)
Sets the instances where all attributes except for the class attribute are
deleted
|
abstract java.lang.String |
toString(java.lang.String metricType)
Outputs the rules
|
public abstract boolean isEmpty()
public abstract void setInstancesNoClass(weka.core.Instances instances)
instances - the instancespublic abstract void setInstancesOnlyClass(weka.core.Instances instances)
instances - the instancespublic abstract 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
premises - the premisesconsequences - the consequencesconfidences - the interestingness measuresjava.lang.Exception - throws eception if preprocessing is not possiblepublic abstract void insertContent(CrNode node, weka.core.FastVector input)
node - the nodeinput - the consequence and the interestingness measurespublic abstract void deleteContent(CrNode node, int index)
node - the nodeindex - the index of the consequencepublic abstract weka.core.FastVector pruningCriterions(weka.core.FastVector input)
input - the criteriapublic abstract void pruneBeforeInsertion(weka.core.FastVector prem,
weka.core.FastVector cons)
prem - the premisecons - the consequencepublic abstract void prune()
public abstract int prunedRules()
public abstract java.lang.String toString(java.lang.String metricType)
metricType - the metrci type of the sort orderpublic static PruneCAR forName(java.lang.String pruningName, java.lang.String[] options) throws java.lang.Exception
pruningName - the fully qualified class name of the PruneCARoptions - an array of options suitable for passing to setOptions. May
be null.java.lang.Exception - if the PruneC>R name is invalid, or the options
supplied are not acceptable to the PruneCAR