public class SubspaceClusterDefinition extends ClusterDefinition
-A <range> Generates randomly distributed instances in the cluster.
-U <range> Generates uniformly distributed instances in the cluster.
-G <range> Generates gaussian distributed instances in the cluster.
-D <num>,<num> The attribute min/max (-A and -U) or mean/stddev (-G) for the cluster.
-N <num>..<num> The range of number of instances per cluster (default 1..50).
-I Uses integer instead of continuous values (default continuous).
SubspaceCluster
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected boolean[] |
m_attributes
attributes of this cluster
|
protected Range |
m_AttrIndexRange
range of atttributes
|
protected int[] |
m_attrIndices
global indices of the attributes of the cluster
|
protected int |
m_clustersubtype
cluster subtypes
|
protected int |
m_clustertype
cluster type
|
protected int |
m_MaxInstNum
maximal number of instances for this cluster
|
protected double[] |
m_maxValue
ranges of each attribute (max); not used if gaussian
|
protected double[] |
m_meanValue
mean ; only used if gaussian
|
protected int |
m_MinInstNum
minimal number of instances for this cluster
|
protected double[] |
m_minValue
ranges of each attribute (min); not used if gaussian
|
protected int |
m_numClusterAttributes
number of attributes the cluster is defined for
|
protected int |
m_numInstances
number of instances for this cluster
|
protected double[] |
m_stddevValue
standarddev; only used if gaussian
|
m_Parent
Constructor and Description |
---|
SubspaceClusterDefinition()
initializes the cluster, without a parent cluster (necessary for GOE)
|
SubspaceClusterDefinition(ClusterGenerator parent)
initializes the cluster with default values
|
Modifier and Type | Method and Description |
---|---|
String |
attributesToString()
Make a string from the attribues list.
|
String |
attrIndexRangeTipText()
Returns the tip text for this property
|
String |
clusterSubTypeTipText()
Returns the tip text for this property
|
String |
clusterTypeTipText()
Returns the tip text for this property
|
protected String |
defaultAttrIndexRange()
returns the default attribute index range
|
protected SelectedTag |
defaultClusterSubType()
returns the default cluster sub type
|
protected SelectedTag |
defaultClusterType()
returns the default cluster type
|
protected int |
defaultMaxInstNum()
returns the default max number of instances
|
protected String |
defaultMeanStddev()
returns the default mean/stddev list
|
protected int |
defaultMinInstNum()
returns the default min number of instances
|
protected String |
defaultValuesList()
returns the default values list
|
boolean[] |
getAttributes() |
String |
getAttrIndexRange()
returns the attribute range(s).
|
SelectedTag |
getClusterSubType()
Gets the cluster sub type.
|
SelectedTag |
getClusterType()
Gets the cluster type.
|
protected String |
getInstNums()
Get a string with the upper and lower boundary for the
number of instances for this cluster.
|
int |
getMaxInstNum()
Gets the upper boundary for instances per cluster.
|
double[] |
getMaxValue() |
String |
getMeanStddev()
returns the current mean/stddev setup
|
double[] |
getMeanValue() |
int |
getMinInstNum()
Gets the lower boundary for instances per cluster.
|
double[] |
getMinValue() |
int |
getNumInstances() |
String[] |
getOptions()
Gets the current settings of the datagenerator BIRCHCluster.
|
String |
getRevision()
Returns the revision string.
|
double[] |
getStddevValue() |
String |
getValuesList()
returns the range for each attribute as string
|
String |
globalInfo()
Returns a string describing this data generator.
|
protected String |
instNumsTipText()
Returns the tip text for this property
|
boolean |
isContinuous()
checks, whether cluster sub type is continuous
|
boolean |
isGaussian()
checks, whether cluster type is gaussian
|
boolean |
isInteger()
checks, whether cluster sub type is integer
|
boolean |
isRandom()
checks, whether cluster type is random
|
boolean |
isUniform()
checks, whether cluster type is uniform
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
String |
maxInstNumTipText()
Returns the tip text for this property
|
String |
meanStddevTipText()
Returns the tip text for this property
|
String |
minInstNumTipText()
Returns the tip text for this property
|
void |
setAttrIndexRange(String rangeList)
Sets which attributes are used in the cluster
attributes among the selection will be discretized.
|
void |
setClusterSubType(SelectedTag value)
Sets the cluster sub type.
|
void |
setClusterType(SelectedTag value)
Sets the cluster type.
|
protected void |
setDefaults()
sets the default values
|
protected void |
setInstNums(String fromTo)
Sets the upper and lower boundary for instances for this cluster.
|
void |
setMaxInstNum(int newMaxInstNum)
Sets the upper boundary for instances per cluster.
|
void |
setMeanStddev(String meanstddev)
Sets mean and standarddeviation.
|
void |
setMinInstNum(int newMinInstNum)
Sets the lower boundary for instances per cluster.
|
void |
setNumInstances(Random r)
Sets the real number of instances for this cluster.
|
void |
setOptions(String[] options)
Parses a list of options for this object.
|
void |
setParent(SubspaceCluster parent)
sets the parent datagenerator this cluster belongs to
|
void |
setValuesList(String fromToList)
Sets the ranges for each attribute.
|
void |
setValuesList(String fromToList,
double[] first,
double[] second,
String optionLetter)
Sets the ranges for each attribute.
|
String |
toString()
Make a string from the cluster features.
|
String |
valuesListTipText()
Returns the tip text for this property
|
getParent, parentTipText, setParent
protected int m_clustertype
protected int m_clustersubtype
protected int m_numClusterAttributes
protected int m_numInstances
protected int m_MinInstNum
protected int m_MaxInstNum
protected Range m_AttrIndexRange
protected boolean[] m_attributes
protected int[] m_attrIndices
protected double[] m_minValue
protected double[] m_maxValue
protected double[] m_meanValue
protected double[] m_stddevValue
public SubspaceClusterDefinition()
public SubspaceClusterDefinition(ClusterGenerator parent)
parent
- the datagenerator this cluster belongs toprotected void setDefaults() throws Exception
setDefaults
in class ClusterDefinition
Exception
- if setting of defaults failspublic String globalInfo()
globalInfo
in class ClusterDefinition
public Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class ClusterDefinition
public void setOptions(String[] options) throws Exception
-A <range> Generates randomly distributed instances in the cluster.
-U <range> Generates uniformly distributed instances in the cluster.
-G <range> Generates gaussian distributed instances in the cluster.
-D <num>,<num> The attribute min/max (-A and -U) or mean/stddev (-G) for the cluster.
-N <num>..<num> The range of number of instances per cluster (default 1..50).
-I Uses integer instead of continuous values (default continuous).
setOptions
in interface OptionHandler
setOptions
in class ClusterDefinition
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 ClusterDefinition
public String attributesToString()
public String toString()
toString
in class ClusterDefinition
public void setParent(SubspaceCluster parent)
parent
- the parent datageneratorprotected String defaultAttrIndexRange()
public void setAttrIndexRange(String rangeList)
rangeList
- a string representing the list of attributes. Since
the string will typically come from a user, attributes are indexed from
1. public String getAttrIndexRange()
public String attrIndexRangeTipText()
public boolean[] getAttributes()
public double[] getMinValue()
public double[] getMaxValue()
public double[] getMeanValue()
public double[] getStddevValue()
public int getNumInstances()
protected SelectedTag defaultClusterType()
public SelectedTag getClusterType()
SubspaceCluster.TAGS_CLUSTERTYPE
public void setClusterType(SelectedTag value)
value
- the new cluster type.SubspaceCluster.TAGS_CLUSTERTYPE
public String clusterTypeTipText()
protected SelectedTag defaultClusterSubType()
public SelectedTag getClusterSubType()
SubspaceCluster.TAGS_CLUSTERSUBTYPE
public void setClusterSubType(SelectedTag value)
value
- the new cluster sub type.SubspaceCluster.TAGS_CLUSTERSUBTYPE
public String clusterSubTypeTipText()
public boolean isRandom()
public boolean isUniform()
public boolean isGaussian()
public boolean isContinuous()
public boolean isInteger()
protected void setInstNums(String fromTo)
fromTo
- the string containing the upper and lower boundary for
instances per cluster separated by ..protected String getInstNums()
protected String instNumsTipText()
protected int defaultMinInstNum()
public int getMinInstNum()
public void setMinInstNum(int newMinInstNum)
newMinInstNum
- new lower boundary for instances per clusterpublic String minInstNumTipText()
protected int defaultMaxInstNum()
public int getMaxInstNum()
public void setMaxInstNum(int newMaxInstNum)
newMaxInstNum
- new upper boundary for instances per clusterpublic String maxInstNumTipText()
public void setNumInstances(Random r)
r
- random number generatorprotected String defaultValuesList()
public void setValuesList(String fromToList) throws Exception
fromToList
- the string containing the upper and lower boundary for
instances per cluster separated by ..Exception
- if values are not correct in number or valuepublic String getValuesList()
public String valuesListTipText()
protected String defaultMeanStddev()
public void setMeanStddev(String meanstddev) throws Exception
meanstddev
- the string containing the upper and lower boundary for
instances per cluster separated by ..Exception
- if values are not correct in number or valuepublic String getMeanStddev()
public String meanStddevTipText()
public void setValuesList(String fromToList, double[] first, double[] second, String optionLetter) throws Exception
fromToList
- the string containing the upper and lower boundary for
instances per cluster separated by ..first
- the "from's"second
- the "to's"optionLetter
- the option, from which the list cameException
- if values are not correct in number or valuepublic String getRevision()
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.