Package weka.datagenerators.clusterers
Class SubspaceClusterDefinition
java.lang.Object
weka.datagenerators.ClusterDefinition
weka.datagenerators.clusterers.SubspaceClusterDefinition
- All Implemented Interfaces:
Serializable
,OptionHandler
,RevisionHandler
A single cluster for the SubspaceCluster data generator.
Valid options are:
-A <range> Uses a random uniform distribution for the instances in the cluster.
-U <range> Generates totally uniformly distributed instances in the cluster.
-G <range> Uses a Gaussian distribution for the instances in the cluster.
-D <num>,<num> The attribute min/max (-A and -U) or mean/stddev (-G) for the cluster, repeated for each attribute.
-N <num>..<num> The range of number of instances per cluster (default 1..50).
-I Uses integer instead of continuous values (default: continuous).
- Version:
- $Revision: 15743 $
- Author:
- Gabi Schmidberger (gabi@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)
- See Also:
-
Constructor Summary
ConstructorDescriptionNeeded so that this class can be found as permissible.initializes the cluster with default values -
Method Summary
Modifier and TypeMethodDescriptionMake a string from the attribues list.Returns the tip text for this propertyReturns the tip text for this propertyReturns the tip text for this propertyboolean[]
returns the attribute range(s).Gets the cluster sub type.Gets the cluster type.int
Gets the upper boundary for instances per cluster.double[]
double[]
int
Gets the lower boundary for instances per cluster.double[]
int
String[]
Gets the current settings of the datagenerator BIRCHCluster.Returns the revision string.double[]
returns the range for each attribute as stringReturns a string describing this data generator.boolean
checks, whether cluster sub type is continuousboolean
checks, whether cluster type is gaussianboolean
checks, whether cluster sub type is integerboolean
isRandom()
checks, whether cluster type is randomboolean
checks, whether cluster type is uniformReturns an enumeration describing the available options.Returns the tip text for this propertyReturns the tip text for this propertyvoid
setAttrIndexRange
(String rangeList) Sets which attributes are used in the cluster.void
setClusterSubType
(SelectedTag value) Sets the cluster sub type.void
setClusterType
(SelectedTag value) Sets the cluster type.void
setMaxInstNum
(int newMaxInstNum) Sets the upper boundary for instances per cluster.void
setMinInstNum
(int newMinInstNum) Sets the lower boundary for instances per cluster.void
Sets the real number of instances for this cluster.void
setOptions
(String[] options) Parses a list of options for this object.void
setValuesList
(String fromToList) Sets the ranges for each attribute.toString()
Make a string from the cluster features.Returns the tip text for this propertyMethods inherited from class weka.datagenerators.ClusterDefinition
getParent, parentTipText, setParent
-
Constructor Details
-
SubspaceClusterDefinition
public SubspaceClusterDefinition()Needed so that this class can be found as permissible. -
SubspaceClusterDefinition
initializes the cluster with default values- Parameters:
parent
- the datagenerator this cluster belongs to
-
-
Method Details
-
globalInfo
Returns a string describing this data generator.- Overrides:
globalInfo
in classClusterDefinition
- Returns:
- a description of the data generator suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- Returns:
- an enumeration of all the available options
-
setOptions
Parses a list of options for this object. Valid options are:-A <range> Uses a random uniform distribution for the instances in the cluster.
-U <range> Generates totally uniformly distributed instances in the cluster.
-G <range> Uses a Gaussian distribution for the instances in the cluster.
-D <num>,<num> The attribute min/max (-A and -U) or mean/stddev (-G) for the cluster, repeated for each attribute.
-N <num>..<num> The range of number of instances per cluster (default 1..50).
-I Uses integer instead of continuous values (default: continuous).
- 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 datagenerator BIRCHCluster.- Returns:
- an array of strings suitable for passing to setOptions
-
attributesToString
Make a string from the attribues list.- Returns:
- the attributes as string
-
toString
Make a string from the cluster features.- Overrides:
toString
in classClusterDefinition
- Returns:
- the cluster features as string
-
setAttrIndexRange
Sets which attributes are used in the cluster.- Parameters:
rangeList
- a string representing the list of attributes. Since the string will typically come from a user, attributes are indexed from 1.
eg: first-3,5,6-last
-
getAttrIndexRange
returns the attribute range(s).- Returns:
- the attribute range(s).
-
attrIndexRangeTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getAttributes
public boolean[] getAttributes() -
getMinValue
public double[] getMinValue() -
getMaxValue
public double[] getMaxValue() -
getMeanValue
public double[] getMeanValue() -
getStddevValue
public double[] getStddevValue() -
getNumInstances
public int getNumInstances() -
getClusterType
Gets the cluster type.- Returns:
- the cluster type
- See Also:
-
setClusterType
Sets the cluster type.- Parameters:
value
- the new cluster type.- See Also:
-
clusterTypeTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getClusterSubType
Gets the cluster sub type.- Returns:
- the cluster sub type
- See Also:
-
setClusterSubType
Sets the cluster sub type.- Parameters:
value
- the new cluster sub type.- See Also:
-
clusterSubTypeTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
isRandom
public boolean isRandom()checks, whether cluster type is random- Returns:
- true if cluster type is random
-
isUniform
public boolean isUniform()checks, whether cluster type is uniform- Returns:
- true if cluster type is uniform
-
isGaussian
public boolean isGaussian()checks, whether cluster type is gaussian- Returns:
- true if cluster type is gaussian
-
isContinuous
public boolean isContinuous()checks, whether cluster sub type is continuous- Returns:
- true if cluster sub type is continuous
-
isInteger
public boolean isInteger()checks, whether cluster sub type is integer- Returns:
- true if cluster sub type is integer
-
getMinInstNum
public int getMinInstNum()Gets the lower boundary for instances per cluster.- Returns:
- the the lower boundary for instances per cluster
-
setMinInstNum
public void setMinInstNum(int newMinInstNum) Sets the lower boundary for instances per cluster.- Parameters:
newMinInstNum
- new lower boundary for instances per cluster
-
minInstNumTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getMaxInstNum
public int getMaxInstNum()Gets the upper boundary for instances per cluster.- Returns:
- the upper boundary for instances per cluster
-
setMaxInstNum
public void setMaxInstNum(int newMaxInstNum) Sets the upper boundary for instances per cluster.- Parameters:
newMaxInstNum
- new upper boundary for instances per cluster
-
maxInstNumTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setNumInstances
Sets the real number of instances for this cluster.- Parameters:
r
- random number generator
-
setValuesList
Sets the ranges for each attribute.- Parameters:
fromToList
- the string containing the upper and lower boundary for instances per cluster separated by ..- Throws:
Exception
- if values are not correct in number or value
-
getValuesList
returns the range for each attribute as string -
valuesListTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getRevision
Returns the revision string.- Returns:
- the revision
-