public class Ridor
extends weka.classifiers.AbstractClassifier
implements weka.core.AdditionalMeasureProducer, weka.core.WeightedInstancesHandler
Valid options are:
-F <number of folds> Set number of folds for IREP One fold is used as pruning set. (default 3)
-S <number of shuffles> Set number of shuffles to randomize the data in order to get better rule. (default 10)
-A Set flag of whether use the error rate of all the data to select the default class in each step. If not set, the learner will only use the error rate in the pruning data
-M Set flag of whether use the majority class as the default class in each step instead of choosing default class based on the error rate (if the flag is not set)
-N <min. weights> Set the minimal weights of instances within a split. (default 2.0)
Constructor and Description |
---|
Ridor() |
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(weka.core.Instances instances)
Builds a ripple-down manner rule learner.
|
double |
classifyInstance(weka.core.Instance datum)
Classify the test instance with the rule learner
|
java.util.Enumeration<java.lang.String> |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
java.lang.String |
foldsTipText()
Returns the tip text for this property
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
int |
getFolds() |
boolean |
getMajorityClass() |
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure
|
double |
getMinNo() |
java.lang.String[] |
getOptions()
Gets the current settings of the Classifier.
|
java.lang.String |
getRevision()
Returns the revision string.
|
int |
getSeed() |
int |
getShuffle() |
boolean |
getWholeDataErr() |
java.lang.String |
globalInfo()
Returns a string describing classifier
|
java.util.Enumeration<weka.core.Option> |
listOptions()
Returns an enumeration describing the available options Valid options are:
|
static void |
main(java.lang.String[] args)
Main method.
|
java.lang.String |
majorityClassTipText()
Returns the tip text for this property
|
java.lang.String |
minNoTipText()
Returns the tip text for this property
|
java.lang.String |
seedTipText()
Returns the tip text for this property
|
void |
setFolds(int fold) |
void |
setMajorityClass(boolean m) |
void |
setMinNo(double m) |
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
void |
setSeed(int s) |
void |
setShuffle(int sh) |
void |
setWholeDataErr(boolean a) |
java.lang.String |
shuffleTipText()
Returns the tip text for this property
|
java.lang.String |
toString()
Prints the all the rules of the rule learner.
|
java.lang.String |
wholeDataErrTipText()
Returns the tip text for this property
|
batchSizeTipText, debugTipText, distributionForInstance, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlaces
public java.lang.String globalInfo()
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.classifiers.Classifier
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.classifiers.AbstractClassifier
public void buildClassifier(weka.core.Instances instances) throws java.lang.Exception
buildClassifier
in interface weka.classifiers.Classifier
instances
- the training datajava.lang.Exception
- if classifier can't be built successfullypublic double classifyInstance(weka.core.Instance datum)
classifyInstance
in interface weka.classifiers.Classifier
classifyInstance
in class weka.classifiers.AbstractClassifier
datum
- the instance to be classifiedpublic java.util.Enumeration<weka.core.Option> listOptions()
-F number
Set number of folds for reduced error pruning. One fold is used as the
pruning set. (Default: 3)
-S number
Set number of shuffles for randomization. (Default: 10)
-A
Set flag of whether use the error rate of all the data to select the
default class in each step. If not set, the learner will only use the error
rate in the pruning data
-M
Set flag of whether use the majority class as the default class in each
step instead of choosing default class based on the error rate (if the flag
is not set)
-N number
Set the minimal weights of instances within a split. (Default: 2)
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.classifiers.AbstractClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-F <number of folds> Set number of folds for IREP One fold is used as pruning set. (default 3)
-S <number of shuffles> Set number of shuffles to randomize the data in order to get better rule. (default 10)
-A Set flag of whether use the error rate of all the data to select the default class in each step. If not set, the learner will only use the error rate in the pruning data
-M Set flag of whether use the majority class as the default class in each step instead of choosing default class based on the error rate (if the flag is not set)
-N <min. weights> Set the minimal weights of instances within a split. (default 2.0)
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.classifiers.AbstractClassifier
options
- 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.OptionHandler
getOptions
in class weka.classifiers.AbstractClassifier
public java.lang.String foldsTipText()
public void setFolds(int fold)
public int getFolds()
public java.lang.String shuffleTipText()
public void setShuffle(int sh)
public int getShuffle()
public java.lang.String seedTipText()
public void setSeed(int s)
public int getSeed()
public java.lang.String wholeDataErrTipText()
public void setWholeDataErr(boolean a)
public boolean getWholeDataErr()
public java.lang.String majorityClassTipText()
public void setMajorityClass(boolean m)
public boolean getMajorityClass()
public java.lang.String minNoTipText()
public void setMinNo(double m)
public double getMinNo()
public java.util.Enumeration<java.lang.String> enumerateMeasures()
enumerateMeasures
in interface weka.core.AdditionalMeasureProducer
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure
in interface weka.core.AdditionalMeasureProducer
additionalMeasureName
- the name of the measure to query for its valuejava.lang.IllegalArgumentException
- if the named measure is not supportedpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.classifiers.AbstractClassifier
public static void main(java.lang.String[] args)
args
- the options for the classifier