public class FilteredClusterer extends SingleClustererEnhancer implements Drawable
-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 FormBayesNet, Newick, NOT_DRAWABLE, TREE| Constructor 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.
|
java.lang.String |
filterTipText()
Returns the tip text for this property.
|
Capabilities |
getCapabilities()
Returns default capabilities of the clusterer.
|
Filter |
getFilter()
Gets the filter used.
|
java.lang.String[] |
getOptions()
Gets the current settings of the clusterer.
|
java.lang.String |
getRevision()
Returns the revision string.
|
java.lang.String |
globalInfo()
Returns a string describing this clusterer.
|
java.lang.String |
graph()
Returns graph describing the clusterer (if possible).
|
int |
graphType()
Returns the type of graph this clusterer represents.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(java.lang.String[] args)
Main method for testing this class.
|
void |
setFilter(Filter filter)
Sets the filter.
|
void |
setOptions(java.lang.String[] options)
Parses a given list of options.
|
java.lang.String |
toString()
Output a representation of this clusterer.
|
clustererTipText, getClusterer, numberOfClusters, setClustererclusterInstance, debugTipText, doNotCheckCapabilitiesTipText, forName, getDebug, getDoNotCheckCapabilities, makeCopies, makeCopy, postExecution, preExecution, run, runClusterer, setDebug, setDoNotCheckCapabilitiesequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic java.lang.String globalInfo()
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class SingleClustererEnhancerpublic void setOptions(java.lang.String[] options)
throws java.lang.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 OptionHandlersetOptions in class SingleClustererEnhanceroptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class SingleClustererEnhancerpublic java.lang.String filterTipText()
public void setFilter(Filter filter)
filter - the filter with all options set.public Filter getFilter()
public Capabilities getCapabilities()
getCapabilities in interface ClusterergetCapabilities in interface CapabilitiesHandlergetCapabilities in class SingleClustererEnhancerCapabilitiespublic void buildClusterer(Instances data) throws java.lang.Exception
buildClusterer in interface ClustererbuildClusterer in class AbstractClustererdata - the training datajava.lang.Exception - if the clusterer could not be built successfullypublic double[] distributionForInstance(Instance instance) throws java.lang.Exception
distributionForInstance in interface ClustererdistributionForInstance in class AbstractClustererinstance - the instance to be classifiedjava.lang.Exception - if instance could not be classified successfullypublic java.lang.String toString()
toString in class java.lang.Objectpublic int graphType()
public java.lang.String graph()
throws java.lang.Exception
public java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClustererpublic static void main(java.lang.String[] args)
args - the commandline options, use "-h" for help