public class FilteredClusterer extends SingleClustererEnhancer
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2" (default: weka.filters.AllFilter)
-W Full name of base 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)Based on code from the FilteredClassifier by Len Trigg.
FilteredClassifier
,
Serialized FormConstructor and Description |
---|
FilteredClusterer()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClusterer(Instances data)
Build the clusterer on the filtered data.
|
double[] |
distributionForInstance(Instance instance)
Classifies a given instance after filtering.
|
String |
filterTipText()
Returns the tip text for this property.
|
Capabilities |
getCapabilities()
Returns default capabilities of the clusterer.
|
Filter |
getFilter()
Gets the filter used.
|
String[] |
getOptions()
Gets the current settings of the clusterer.
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing this clusterer.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for testing this class.
|
void |
setFilter(Filter filter)
Sets the filter.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
String |
toString()
Output a representation of this clusterer.
|
clustererTipText, getClusterer, numberOfClusters, setClusterer
clusterInstance, forName, makeCopies, makeCopy
public String globalInfo()
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class SingleClustererEnhancer
public void setOptions(String[] options) throws Exception
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.unsupervised.attribute.Remove -V -R 1,2" (default: weka.filters.AllFilter)
-W Full name of base 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 OptionHandler
setOptions
in class SingleClustererEnhancer
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class SingleClustererEnhancer
public String filterTipText()
public void setFilter(Filter filter)
filter
- the filter with all options set.public Filter getFilter()
public Capabilities getCapabilities()
getCapabilities
in interface Clusterer
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class SingleClustererEnhancer
Capabilities
public void buildClusterer(Instances data) throws Exception
buildClusterer
in interface Clusterer
buildClusterer
in class AbstractClusterer
data
- the training dataException
- if the clusterer could not be built successfullypublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance
in interface Clusterer
distributionForInstance
in class AbstractClusterer
instance
- the instance to be classifiedException
- if instance could not be classified
successfullypublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClusterer
public static void main(String[] args)
args
- the commandline options, use "-h" for helpCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.