类 ClassificationViaClustering
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.meta.ClassificationViaClustering
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
A simple meta-classifier that uses a clusterer for classification. For cluster algorithms that use a fixed number of clusterers, like SimpleKMeans, the user has to make sure that the number of clusters to generate are the same as the number of class labels in the dataset in order to obtain a useful model.
Note: at prediction time, a missing value is returned if no cluster is found for the instance.
The code is based on the 'clusters to classes' functionality of the weka.clusterers.ClusterEvaluation class by Mark Hall. Valid options are:
Note: at prediction time, a missing value is returned if no cluster is found for the instance.
The code is based on the 'clusters to classes' functionality of the weka.clusterers.ClusterEvaluation class by Mark Hall. Valid options are:
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of clusterer. (default: weka.clusterers.SimpleKMeans)
Options specific to clusterer weka.clusterers.SimpleKMeans:
-N <num> number of clusters. (default 2).
-V Display std. deviations for centroids.
-M Replace missing values with mean/mode.
-S <num> Random number seed. (default 10)
- 版本:
- $Revision: 1.5 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) builds the classifierdouble
classifyInstance
(Instance instance) Classifies the given test instance.Returns the tip text for this propertyReturns default capabilities of the classifier.Get the clusterer used as the base learner.String[]
returns the options of the current setupReturns the revision string.Returns a string describing classifierGets an enumeration describing the available options.static void
Runs the classifier with the given optionsvoid
setClusterer
(Clusterer value) Set the base clusterer.void
setOptions
(String[] options) Parses the options for this object.toString()
Returns a string representation of the classifier.从类继承的方法 weka.classifiers.Classifier
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
ClassificationViaClustering
public ClassificationViaClustering()default constructor
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
listOptions
Gets an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中Classifier
- 返回:
- an enumeration of all the available options.
-
getOptions
returns the options of the current setup- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中Classifier
- 返回:
- the current options
-
setOptions
Parses the options for this object. Valid options are:-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of clusterer. (default: weka.clusterers.SimpleKMeans)
Options specific to clusterer weka.clusterers.SimpleKMeans:
-N <num> number of clusters. (default 2).
-V Display std. deviations for centroids.
-M Replace missing values with mean/mode.
-S <num> Random number seed. (default 10)
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中Classifier
- 参数:
options
- the options to use- 抛出:
Exception
- if setting of options fails
-
clustererTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setClusterer
Set the base clusterer.- 参数:
value
- the clusterer to use.
-
getClusterer
Get the clusterer used as the base learner.- 返回:
- the current clusterer
-
classifyInstance
Classifies the given test instance.- 覆盖:
classifyInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- the predicted most likely class for the instance or Instance.missingValue() if no prediction is made
- 抛出:
Exception
- if an error occurred during the prediction
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中Classifier
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
builds the classifier- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- the training instances- 抛出:
Exception
- if something goes wrong
-
toString
Returns a string representation of the classifier. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Runs the classifier with the given options- 参数:
args
- the commandline options
-