public class Ridor extends Classifier implements AdditionalMeasureProducer, 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(Instances instances)
Builds a ripple-down manner rule learner.
|
double |
classifyInstance(Instance datum)
Classify the test instance with the rule learner
|
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names
|
java.lang.String |
foldsTipText()
Returns the tip text for this property
|
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 |
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
|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug
public java.lang.String globalInfo()
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
public void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class Classifier
instances
- the training datajava.lang.Exception
- if classifier can't be built successfullypublic double classifyInstance(Instance datum)
classifyInstance
in class Classifier
datum
- the instance to be classifiedpublic java.util.Enumeration 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 OptionHandler
listOptions
in class Classifier
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 OptionHandler
setOptions
in class Classifier
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 OptionHandler
getOptions
in class Classifier
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 enumerateMeasures()
enumerateMeasures
in interface AdditionalMeasureProducer
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure
in interface 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 RevisionHandler
getRevision
in class Classifier
public static void main(java.lang.String[] args)
args
- the options for the classifier