| weka.classifiers.RandomizableClassifier weka.classifiers.misc.OLM
OLM | public class OLM extends RandomizableClassifier implements TechnicalInformationHandler(Code) | |
This class is an implementation of the Ordinal Learning Method
Further information regarding the algorithm and variants can be found in:
Arie Ben-David (1992). Automatic Generation of Symbolic Multiattribute Ordinal Knowledge-Based DSSs: methodology and Applications. Decision Sciences. 23:1357-1372.
Lievens, Stijn (2003-2004). Studie en implementatie van instantie-gebaseerde algoritmen voor gesuperviseerd rangschikken..
BibTeX:
@article{Ben-David1992,
author = {Arie Ben-David},
journal = {Decision Sciences},
pages = {1357-1372},
title = {Automatic Generation of Symbolic Multiattribute Ordinal Knowledge-Based DSSs: methodology and Applications},
volume = {23},
year = {1992}
}
@mastersthesis{Lievens2003-2004,
author = {Lievens, Stijn},
school = {Ghent University},
title = {Studie en implementatie van instantie-gebaseerde algoritmen voor gesuperviseerd rangschikken.},
year = {2003-2004}
}
Valid options are:
-S <num>
Random number seed.
(default 1)
-D
If set, classifier is run in debug mode and
may output additional info to the console
-C <CL|REG>
Sets the classification type to be used.
(Default: REG)
-A <MEAN|MED|MAX>
Sets the averaging type used in phase 1 of the classifier.
(Default: MEAN)
-N <NONE|EUCL|HAM>
If different from NONE, a nearest neighbour rule is fired when the
rule base doesn't contain an example smaller than the instance
to be classified
(Default: NONE).
-E <MIN|MAX|BOTH>
Sets the extension type, i.e. the rule base to use.
(Default: MIN)
-sort
If set, the instances are also sorted within the same class
before building the rule bases
author: Stijn Lievens (stijn.lievens@ugent.be) version: $Revision: 1.1 $ |
Field Summary | |
final public static int | AT_MAXPROB Use the mode for averaging in phase 1. | final public static int | AT_MEAN Use the mean for averaging in phase 1. | final public static int | AT_MEDIAN Use the median for averaging in phase 1. | final public static int | CT_REAL No rounding is performed during classification, this is the
classification is done in a regression like way. | final public static int | CT_ROUNDED Round the real value that is returned by the original algorithm
to the nearest label. | final public static int | DT_EUCLID Use the Euclidian distance whenever a nearest neighbour
rule is fired. | final public static int | DT_HAMMING | final public static int | DT_NONE | final public static int | ET_BOTH Combine both the minimal and maximal extension, and use the
midpoint of the resulting interval as prediction. | final public static int | ET_MAX Use only the maximal extension. | final public static int | ET_MIN Use only the minimal extension, as in the original algorithm
of Ben-David. | final public static Tag[] | TAGS_AVERAGINGTYPES | final public static Tag[] | TAGS_CLASSIFICATIONTYPES | final public static Tag[] | TAGS_DISTANCETYPES | final public static Tag[] | TAGS_EXTENSIONTYPES |
AT_MAXPROB | final public static int AT_MAXPROB(Code) | | Use the mode for averaging in phase 1. The label
that has maximum frequency is used. If there is more
than one label that has maximum frequency, the lowest
one is prefered.
|
AT_MEAN | final public static int AT_MEAN(Code) | | Use the mean for averaging in phase 1. This is in fact a
non ordinal procedure. The scores used for averaging are the internal
values of WEKA.
|
AT_MEDIAN | final public static int AT_MEDIAN(Code) | | Use the median for averaging in phase 1. The possible values
are in the extended set of labels, this is labels in between the
original labels are possible.
|
CT_REAL | final public static int CT_REAL(Code) | | No rounding is performed during classification, this is the
classification is done in a regression like way.
|
CT_ROUNDED | final public static int CT_ROUNDED(Code) | | Round the real value that is returned by the original algorithm
to the nearest label.
|
DT_EUCLID | final public static int DT_EUCLID(Code) | | Use the Euclidian distance whenever a nearest neighbour
rule is fired.
|
DT_HAMMING | final public static int DT_HAMMING(Code) | | Use the Hamming distance, this is the number of
positions in which the instances differ, whenever a
nearest neighbour rule is fired
|
DT_NONE | final public static int DT_NONE(Code) | | No nearest neighbour rule will be fired when
classifying an instance for which there is no smaller rule
in the rule base?
|
ET_BOTH | final public static int ET_BOTH(Code) | | Combine both the minimal and maximal extension, and use the
midpoint of the resulting interval as prediction.
|
ET_MAX | final public static int ET_MAX(Code) | | Use only the maximal extension. In this case an algorithm
dual to the original one is performed.
|
ET_MIN | final public static int ET_MIN(Code) | | Use only the minimal extension, as in the original algorithm
of Ben-David.
|
TAGS_AVERAGINGTYPES | final public static Tag[] TAGS_AVERAGINGTYPES(Code) | | the averaging types
|
TAGS_CLASSIFICATIONTYPES | final public static Tag[] TAGS_CLASSIFICATIONTYPES(Code) | | the classification types
|
TAGS_DISTANCETYPES | final public static Tag[] TAGS_DISTANCETYPES(Code) | | the distance types
|
TAGS_EXTENSIONTYPES | final public static Tag[] TAGS_EXTENSIONTYPES(Code) | | the mode types
|
averagingTypeTipText | public String averagingTypeTipText()(Code) | | Returns the tip text for this property.
tip text for this property suitable for displaying in the explorer/experimenter gui |
buildClassifier | public void buildClassifier(Instances instances) throws Exception(Code) | | Build the OLM classifier, meaning that the rule bases
are built.
Parameters: instances - the instances to use for building the rule base throws: Exception - if instances cannot be handled bythe classifier. |
classificationTypeTipText | public String classificationTypeTipText()(Code) | | Returns the tip text for this property.
tip text for this property suitable for displaying in the explorer/experimenter gui |
classifyInstance | public double classifyInstance(Instance instance)(Code) | | Classifies a given instance according to the current settings
of the classifier.
Parameters: instance - the instance to be classified a double that represents the classification,this could either be the internal value of a label, when rounding is on, or a real number. |
distanceTypeTipText | public String distanceTypeTipText()(Code) | | Returns the tip text for this property.
tip text for this property suitable for displaying in the explorer/experimenter gui |
extensionTypeTipText | public String extensionTypeTipText()(Code) | | Returns the tip text for this property.
tip text for this property suitable for displaying in the explorer/experimenter gui |
getAveragingType | public SelectedTag getAveragingType()(Code) | | Gets the averaging type.
the averaging type |
getCapabilities | public Capabilities getCapabilities()(Code) | | Returns default capabilities of the classifier.
the capabilities of this classifier |
getClassificationType | public SelectedTag getClassificationType()(Code) | | Gets the classification type.
the classification type |
getDistanceType | public SelectedTag getDistanceType()(Code) | | Gets the distance type used by a nearest neighbour rule (if any).
the distance type |
getExtensionType | public SelectedTag getExtensionType()(Code) | | Gets the extension type.
the extension type |
getOptions | public String[] getOptions()(Code) | | Gets an array of string with the current options of the classifier.
an array suitable as argument for setOptions |
getSizeRuleBaseMax | public int getSizeRuleBaseMax()(Code) | | Return the number of examples in the maximal rule base.
The maximal rule base is built using an algorithm
dual to that for building the minimal rule base.
the number of examples in the maximal rule base |
getSizeRuleBaseMin | public int getSizeRuleBaseMin()(Code) | | Return the number of examples in the minimal rule base.
The minimal rule base is the one that corresponds to the
rule base of Ben-David.
the number of examples in the minimal rule base |
getSort | public boolean getSort()(Code) | | Returns if the instances are sorted prior to building the rule bases.
true if instances are sorted prior to buildingthe rule bases, false otherwise. |
getTechnicalInformation | public TechnicalInformation getTechnicalInformation()(Code) | | Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
the technical information about this class |
globalInfo | public String globalInfo()(Code) | | Returns a string describing the classifier.
a description suitable for displaying in the explorer/experimenter gui |
listOptions | public Enumeration listOptions()(Code) | | Get an enumeration of all available options for this classifier.
an enumeration of available options |
main | public static void main(String[] args)(Code) | | Main method for testing this class.
Parameters: args - the command line arguments |
seedTipText | public String seedTipText()(Code) | | Returns the tip text for this property.
tip text for this property suitable for displaying in the explorer/experimenter gui |
setAveragingType | public void setAveragingType(SelectedTag value)(Code) | | Sets the averaging type to use in phase 1 of the algorithm.
Parameters: value - the averaging type to use |
setClassificationType | public void setClassificationType(SelectedTag value)(Code) | | Sets the classification type.
Parameters: value - the classification type to be set. |
setDistanceType | public void setDistanceType(SelectedTag value)(Code) | | Sets the distance type to be used by a nearest neighbour rule (if any).
Parameters: value - the distance type to use |
setExtensionType | public void setExtensionType(SelectedTag value)(Code) | | Sets the extension type to use.
The minimal extension is the one used by
Ben-David in the original algorithm. The maximal extension is
a completely dual variant of the minimal extension. When using
both, then the midpoint of the interval determined by both
extensions is returned.
Parameters: value - the extension type to use |
setOptions | public void setOptions(String[] options) throws Exception(Code) | | Parses the options for this object.
Valid options are:
-S <num>
Random number seed.
(default 1)
-D
If set, classifier is run in debug mode and
may output additional info to the console
-C <CL|REG>
Sets the classification type to be used.
(Default: REG)
-A <MEAN|MED|MAX>
Sets the averaging type used in phase 1 of the classifier.
(Default: MEAN)
-N <NONE|EUCL|HAM>
If different from NONE, a nearest neighbour rule is fired when the
rule base doesn't contain an example smaller than the instance
to be classified
(Default: NONE).
-E <MIN|MAX|BOTH>
Sets the extension type, i.e. the rule base to use.
(Default: MIN)
-sort
If set, the instances are also sorted within the same class
before building the rule bases
Parameters: options - an array of strings containing the options throws: Exception - if there are options that have invalid arguments. |
setSort | public void setSort(boolean sort)(Code) | | Sets if the instances are to be sorted prior to building the rule bases.
Parameters: sort - if true the instances will be sorted |
sortTipText | public String sortTipText()(Code) | | Returns the tip text for this property.
tip text for this property suitable for displaying in the explorer/experimenter gui |
toString | public String toString()(Code) | | Returns a string description of the classifier. In debug
mode, the rule bases are added to the string representation
as well. This means that the description can become rather
lengthy.
a String describing the classifier. |
Fields inherited from weka.classifiers.RandomizableClassifier | protected int m_Seed(Code)(Java Doc)
|
|
|