类 KStar
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.lazy.KStar
- 所有已实现的接口:
Serializable
,Cloneable
,KStarConstants
,UpdateableClassifier
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
,TechnicalInformationHandler
public class KStar
extends Classifier
implements KStarConstants, UpdateableClassifier, TechnicalInformationHandler
K* is an instance-based classifier, that is the class of a test instance is based upon the class of those training instances similar to it, as determined by some similarity function. It differs from other instance-based learners in that it uses an entropy-based distance function.
For more information on K*, see
John G. Cleary, Leonard E. Trigg: K*: An Instance-based Learner Using an Entropic Distance Measure. In: 12th International Conference on Machine Learning, 108-114, 1995. BibTeX:
For more information on K*, see
John G. Cleary, Leonard E. Trigg: K*: An Instance-based Learner Using an Entropic Distance Measure. In: 12th International Conference on Machine Learning, 108-114, 1995. BibTeX:
@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)
- 版本:
- $Revision: 5525 $
- 作者:
- Len Trigg (len@reeltwo.com), Abdelaziz Mahoui (am14@cs.waikato.ac.nz) - Java port
- 另请参阅:
-
字段概要
字段从接口继承的字段 weka.classifiers.lazy.kstar.KStarConstants
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
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances instances) Generates the classifier.double[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.Returns the tip text for this propertyReturns default capabilities of the classifier.boolean
Get whether entropic blending being usedint
Get the value of the global blend parameterGets the method to use for handling missing values.String[]
Gets the current settings of K*.Returns the revision string.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.Returns the tip text for this propertyReturns a string describing classifierReturns an enumeration describing the available options.static void
Main method for testing this class.Returns the tip text for this propertyvoid
setEntropicAutoBlend
(boolean e) Set whether entropic blending is to be used.void
setGlobalBlend
(int b) Set the global blend parametervoid
setMissingMode
(SelectedTag newMode) Sets the method to use for handling missing values.void
setOptions
(String[] options) Parses a given list of options.toString()
Returns a description of this classifier.void
updateClassifier
(Instance instance) Adds the supplied instance to the training set从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
字段详细资料
-
TAGS_MISSING
Define possible missing value handling methods
-
-
构造器详细资料
-
KStar
public KStar()
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
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.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Generates the classifier.- 指定者:
buildClassifier
在类中Classifier
- 参数:
instances
- set of instances serving as training data- 抛出:
Exception
- if the classifier has not been generated successfully
-
updateClassifier
Adds the supplied instance to the training set- 指定者:
updateClassifier
在接口中UpdateableClassifier
- 参数:
instance
- the instance to add- 抛出:
Exception
- if instance could not be incorporated successfully
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- predicted class probability distribution
- 抛出:
Exception
- if an error occurred during the prediction
-
missingModeTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getMissingMode
Gets the method to use for handling missing values. Will be one of M_NORMAL, M_AVERAGE, M_MAXDIFF or M_DELETE.- 返回:
- the method used for handling missing values.
-
setMissingMode
Sets the method to use for handling missing values. Values other than M_NORMAL, M_AVERAGE, M_MAXDIFF and M_DELETE will be ignored.- 参数:
newMode
- the method to use for handling missing values.
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all the available options.
-
globalBlendTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setGlobalBlend
public void setGlobalBlend(int b) Set the global blend parameter- 参数:
b
- the value for global blending
-
getGlobalBlend
public int getGlobalBlend()Get the value of the global blend parameter- 返回:
- the value of the global blend parameter
-
entropicAutoBlendTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setEntropicAutoBlend
public void setEntropicAutoBlend(boolean e) Set whether entropic blending is to be used.- 参数:
e
- true if entropic blending is to be used
-
getEntropicAutoBlend
public boolean getEntropicAutoBlend()Get whether entropic blending being used- 返回:
- true if entropic blending is used
-
setOptions
Parses a given list of options. 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)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中Classifier
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of K*.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- an array of strings suitable for passing to setOptions()
-
toString
Returns a description of this classifier. -
main
Main method for testing this class.- 参数:
argv
- should contain command line options (see setOptions)
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-