Package weka.experiment
Class DensityBasedClustererSplitEvaluator
java.lang.Object
weka.experiment.DensityBasedClustererSplitEvaluator
- All Implemented Interfaces:
Serializable
,AdditionalMeasureProducer
,OptionHandler
,RevisionHandler
,SplitEvaluator
public class DensityBasedClustererSplitEvaluator
extends Object
implements SplitEvaluator, OptionHandler, AdditionalMeasureProducer, RevisionHandler
A SplitEvaluator that produces results for a
density based clusterer.
Valid options are:
-no-size Skips the determination of sizes (train/test/clusterer) (default: sizes are determined)
-W <class name> The full class name of the density based clusterer. eg: weka.clusterers.EM
Options specific to clusterer weka.clusterers.EM:
-N <num> number of clusters. If omitted or -1 specified, then cross validation is used to select the number of clusters.
-I <num> max iterations. (default 100)
-V verbose.
-M <num> minimum allowable standard deviation for normal density computation (default 1e-6)
-O Display model in old format (good when there are many clusters)
-S <num> Random number seed. (default 100)All options after -- will be passed to the clusterer.
- Version:
- $Revision: 11323 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}org
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the tip text for this propertyReturns an enumeration of any additional measure names that might be in the classifierGet the value of clustererObject[]
getKey()
Gets the key describing the current SplitEvaluator.String[]
Gets the names of each of the key columns produced for a single run.Object[]
Gets the data types of each of the key columns produced for a single run.double
getMeasure
(String additionalMeasureName) Returns the value of the named measureboolean
Returns whether the size determination (train/test/clusterer) is skipped.String[]
Gets the current settings of the Classifier.Gets the raw output from the classifierboolean
Get whether the class column is to be removed.Object[]
Gets the results for the supplied train and test datasets.String[]
Gets the names of each of the result columns produced for a single run.Object[]
Gets the data types of each of the result columns produced for a single run.Returns the revision string.Returns a string describing this split evaluatorReturns an enumeration describing the available options.Returns the tip text for this propertyReturns the tip text for this propertyvoid
setAdditionalMeasures
(String[] additionalMeasures) Set a list of method names for additional measures to look for in Classifiers.void
setClusterer
(DensityBasedClusterer newClusterer) Sets the clusterer.void
setClustererName
(String newClustererName) Set the Clusterer to use, given it's class name.void
setNoSizeDetermination
(boolean value) Sets whether the size determination (train/test/clusterer) is skipped.void
setOptions
(String[] options) Parses a given list of options.void
setRemoveClassColumn
(boolean r) Set whether the class column should be removed from the data.toString()
Returns a text description of the split evaluator.
-
Constructor Details
-
DensityBasedClustererSplitEvaluator
public DensityBasedClustererSplitEvaluator()
-
-
Method Details
-
globalInfo
Returns a string describing this split evaluator- Returns:
- a description of the split evaluator suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceOptionHandler
- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-W classname
Specify the full class name of the clusterer to evaluate.All option after -- will be passed to the classifier.
- Specified by:
setOptions
in interfaceOptionHandler
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Classifier.- Specified by:
getOptions
in interfaceOptionHandler
- Returns:
- an array of strings suitable for passing to setOptions
-
setAdditionalMeasures
Set a list of method names for additional measures to look for in Classifiers. This could contain many measures (of which only a subset may be produceable by the current Classifier) if an experiment is the type that iterates over a set of properties.- Specified by:
setAdditionalMeasures
in interfaceSplitEvaluator
- Parameters:
additionalMeasures
- a list of method names
-
enumerateMeasures
Returns an enumeration of any additional measure names that might be in the classifier- Specified by:
enumerateMeasures
in interfaceAdditionalMeasureProducer
- Returns:
- an enumeration of the measure names
-
getMeasure
Returns the value of the named measure- Specified by:
getMeasure
in interfaceAdditionalMeasureProducer
- Parameters:
additionalMeasureName
- the name of the measure to query for its value- Returns:
- the value of the named measure
- Throws:
IllegalArgumentException
- if the named measure is not supported
-
getKeyTypes
Gets the data types of each of the key columns produced for a single run. The number of key fields must be constant for a given SplitEvaluator.- Specified by:
getKeyTypes
in interfaceSplitEvaluator
- Returns:
- an array containing objects of the type of each key column. The objects should be Strings, or Doubles.
-
getKeyNames
Gets the names of each of the key columns produced for a single run. The number of key fields must be constant for a given SplitEvaluator.- Specified by:
getKeyNames
in interfaceSplitEvaluator
- Returns:
- an array containing the name of each key column
-
getKey
Gets the key describing the current SplitEvaluator. For example This may contain the name of the classifier used for classifier predictive evaluation. The number of key fields must be constant for a given SplitEvaluator.- Specified by:
getKey
in interfaceSplitEvaluator
- Returns:
- an array of objects containing the key.
-
getResultTypes
Gets the data types of each of the result columns produced for a single run. The number of result fields must be constant for a given SplitEvaluator.- Specified by:
getResultTypes
in interfaceSplitEvaluator
- Returns:
- an array containing objects of the type of each result column. The objects should be Strings, or Doubles.
-
getResultNames
Gets the names of each of the result columns produced for a single run. The number of result fields must be constant for a given SplitEvaluator.- Specified by:
getResultNames
in interfaceSplitEvaluator
- Returns:
- an array containing the name of each result column
-
getResult
Gets the results for the supplied train and test datasets.- Specified by:
getResult
in interfaceSplitEvaluator
- Parameters:
train
- the training Instances.test
- the testing Instances.- Returns:
- the results stored in an array. The objects stored in the array may be Strings, Doubles, or null (for the missing value).
- Throws:
Exception
- if a problem occurs while getting the results
-
removeClassColumnTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setRemoveClassColumn
public void setRemoveClassColumn(boolean r) Set whether the class column should be removed from the data.- Parameters:
r
- true if the class column is to be removed.
-
getRemoveClassColumn
public boolean getRemoveClassColumn()Get whether the class column is to be removed.- Returns:
- true if the class column is to be removed.
-
clustererTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getClusterer
Get the value of clusterer- Returns:
- Value of clusterer.
-
setClusterer
Sets the clusterer.- Parameters:
newClusterer
- the new clusterer to use.
-
getNoSizeDetermination
public boolean getNoSizeDetermination()Returns whether the size determination (train/test/clusterer) is skipped.- Returns:
- true if size determination skipped
-
setNoSizeDetermination
public void setNoSizeDetermination(boolean value) Sets whether the size determination (train/test/clusterer) is skipped.- Parameters:
value
- true if to determine sizes
-
noSizeDeterminationTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setClustererName
Set the Clusterer to use, given it's class name. A new clusterer will be instantiated.- Parameters:
newClustererName
- the clusterer class name.- Throws:
Exception
- if the class name is invalid.
-
getRawResultOutput
Gets the raw output from the classifier- Specified by:
getRawResultOutput
in interfaceSplitEvaluator
- Returns:
- the raw output from the classifier
-
toString
Returns a text description of the split evaluator. -
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Returns:
- the revision
-