public class KStar extends AbstractClassifier implements KStarConstants, UpdateableClassifier, TechnicalInformationHandler
@inproceedings{Cleary1995,
author = {John G. Cleary and Leonard E. Trigg},
booktitle = {12th International Conference on Machine Learning},
pages = {108-114},
title = {K*: An Instance-based Learner Using an Entropic Distance Measure},
year = {1995}
}
Valid options are:
-B <num> Manual blend setting (default 20%)
-E Enable entropic auto-blend setting (symbolic class only)
-M <char> Specify the missing value treatment mode (default a) Valid options are: a(verage), d(elete), m(axdiff), n(ormal)
| Modifier and Type | Field and Description |
|---|---|
static Tag[] |
TAGS_MISSING
Define possible missing value handling methods
|
B_ENTROPY, B_SPHERE, EPSILON, FLOOR, FLOOR1, INITIAL_STEP, LOG2, M_AVERAGE, M_DELETE, M_MAXDIFF, M_NORMAL, NUM_RAND_COLS, OFF, ON, ROOT_FINDER_ACCURACY, ROOT_FINDER_MAX_ITER| Constructor and Description |
|---|
KStar() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances instances)
Generates the classifier.
|
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test instance.
|
String |
entropicAutoBlendTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
boolean |
getEntropicAutoBlend()
Get whether entropic blending being used
|
int |
getGlobalBlend()
Get the value of the global blend parameter
|
SelectedTag |
getMissingMode()
Gets the method to use for handling missing values.
|
String[] |
getOptions()
Gets the current settings of K*.
|
String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
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.
|
String |
globalBlendTipText()
Returns the tip text for this property
|
String |
globalInfo()
Returns a string describing classifier
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] argv)
Main method for testing this class.
|
String |
missingModeTipText()
Returns the tip text for this property
|
void |
setEntropicAutoBlend(boolean e)
Set whether entropic blending is to be used.
|
void |
setGlobalBlend(int b)
Set the global blend parameter
|
void |
setMissingMode(SelectedTag newMode)
Sets the method to use for handling missing values.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
String |
toString()
Returns a description of this classifier.
|
void |
updateClassifier(Instance instance)
Adds the supplied instance to the training set
|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebugpublic static final Tag[] TAGS_MISSING
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Capabilities getCapabilities()
getCapabilities in interface ClassifiergetCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractClassifierCapabilitiespublic void buildClassifier(Instances instances) throws Exception
buildClassifier in interface Classifierinstances - set of instances serving as training dataException - if the classifier has not been generated successfullypublic void updateClassifier(Instance instance) throws Exception
updateClassifier in interface UpdateableClassifierinstance - the instance to addException - if instance could not be incorporated successfullypublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to be classifiedException - if an error occurred during the predictionpublic String missingModeTipText()
public SelectedTag getMissingMode()
public void setMissingMode(SelectedTag newMode)
newMode - the method to use for handling missing values.public Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class AbstractClassifierpublic String globalBlendTipText()
public void setGlobalBlend(int b)
b - the value for global blendingpublic int getGlobalBlend()
public String entropicAutoBlendTipText()
public void setEntropicAutoBlend(boolean e)
e - true if entropic blending is to be usedpublic boolean getEntropicAutoBlend()
public void setOptions(String[] options) throws Exception
-B <num> Manual blend setting (default 20%)
-E Enable entropic auto-blend setting (symbolic class only)
-M <char> Specify the missing value treatment mode (default a) Valid options are: a(verage), d(elete), m(axdiff), n(ormal)
setOptions in interface OptionHandlersetOptions in class AbstractClassifieroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class AbstractClassifierpublic String toString()
public static void main(String[] argv)
argv - should contain command line options (see setOptions)public String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.