public class ClassificationViaClustering extends Classifier
-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)
| Constructor and Description |
|---|
ClassificationViaClustering()
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances data)
builds the classifier
|
double |
classifyInstance(Instance instance)
Classifies the given test instance.
|
String |
clustererTipText()
Returns the tip text for this property
|
Capabilities |
getCapabilities()
Returns default capabilities of the classifier.
|
Clusterer |
getClusterer()
Get the clusterer used as the base learner.
|
String[] |
getOptions()
returns the options of the current setup
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing classifier
|
Enumeration |
listOptions()
Gets an enumeration describing the available options.
|
static void |
main(String[] args)
Runs the classifier with the given options
|
void |
setClusterer(Clusterer value)
Set the base clusterer.
|
void |
setOptions(String[] options)
Parses the options for this object.
|
String |
toString()
Returns a string representation of the classifier.
|
debugTipText, distributionForInstance, forName, getDebug, makeCopies, makeCopy, setDebugpublic ClassificationViaClustering()
public String globalInfo()
public Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class Classifierpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class Classifierpublic void setOptions(String[] options) throws Exception
-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 in interface OptionHandlersetOptions in class Classifieroptions - the options to useException - if setting of options failspublic String clustererTipText()
public void setClusterer(Clusterer value)
value - the clusterer to use.public Clusterer getClusterer()
public double classifyInstance(Instance instance) throws Exception
classifyInstance in class Classifierinstance - the instance to be classifiedException - if an error occurred during the predictionpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ClassifierCapabilitiespublic void buildClassifier(Instances data) throws Exception
buildClassifier in class Classifierdata - the training instancesException - if something goes wrongpublic String toString()
public String getRevision()
getRevision in interface RevisionHandlergetRevision in class Classifierpublic static void main(String[] args)
args - the commandline optionsCopyright © 2021 University of Waikato, Hamilton, NZ. All rights reserved.