public abstract class ClusterGenerator extends DataGenerator
public static void main(String[] args) {
try {
DataGenerator.makeData(new RandomGenerator(), args);
} catch (Exception e) {
e.printStackTrace();
System.err.println(e.getMessage());
}
}
| Modifier and Type | Field and Description |
|---|---|
protected Range |
m_booleanCols
Stores which columns are boolean (default numeric)
|
protected boolean |
m_ClassFlag
class flag
|
protected Range |
m_nominalCols
Stores which columns are nominal (default numeric)
|
protected int |
m_NumAttributes
Number of attribute the dataset should have
|
m_CreatingRelationName, m_DatasetFormat, m_Debug, m_DefaultOutput, m_NumExamplesAct, m_OptionBlacklist, m_Output, m_Random, m_RelationName, m_Seed| Constructor and Description |
|---|
ClusterGenerator()
initializes the generator
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
booleanColsTipText()
Returns the tip text for this property
|
protected java.lang.String |
checkIndices()
check if attribute types are not contradicting
|
java.lang.String |
classFlagTipText()
Returns the tip text for this property
|
protected int |
defaultNumAttributes()
returns the default number of attributes
|
Range |
getBooleanCols()
returns the range of boolean attributes.
|
boolean |
getClassFlag()
Gets the class flag.
|
Range |
getNominalCols()
returns the range of nominal attributes
|
int |
getNumAttributes()
Gets the number of attributes that should be produced.
|
java.lang.String[] |
getOptions()
Gets the current settings of the classifier.
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
java.lang.String |
nominalColsTipText()
Returns the tip text for this property
|
java.lang.String |
numAttributesTipText()
Returns the tip text for this property
|
void |
setBooleanCols(Range value)
Sets which attributes are boolean.
|
void |
setBooleanIndices(java.lang.String rangeList)
Sets which attributes are boolean
|
void |
setClassFlag(boolean classFlag)
Sets the class flag, if class flag is set, the cluster is listed as class
atrribute in an extra attribute.
|
void |
setNominalCols(Range value)
Sets which attributes are nominal.
|
void |
setNominalIndices(java.lang.String rangeList)
Sets which attributes are nominal
|
void |
setNumAttributes(int numAttributes)
Sets the number of attributes the dataset should have.
|
void |
setOptions(java.lang.String[] options)
Sets the options.
|
addToBlacklist, clearBlacklist, debugTipText, defaultNumExamplesAct, defaultOutput, defaultRelationName, defaultSeed, defineDataFormat, enumToVector, formatTipText, generateExample, generateExamples, generateFinished, generateStart, getDatasetFormat, getDebug, getEpilogue, getNumExamplesAct, getOutput, getPrologue, getRandom, getRelationName, getRelationNameToUse, getSeed, getSingleModeFlag, isOnBlacklist, makeData, makeOptionString, numExamplesActTipText, outputTipText, randomTipText, relationNameTipText, removeBlacklist, runDataGenerator, seedTipText, setDatasetFormat, setDebug, setNumExamplesAct, setOutput, setRandom, setRelationName, setSeed, toStringFormatclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRevisionprotected int m_NumAttributes
protected boolean m_ClassFlag
protected Range m_booleanCols
protected Range m_nominalCols
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class DataGeneratorpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
setOptions in interface OptionHandlersetOptions in class DataGeneratoroptions - the optionsjava.lang.Exception - if invalid optionpublic java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class DataGeneratorDataGenerator.removeBlacklist(String[])protected int defaultNumAttributes()
public void setNumAttributes(int numAttributes)
numAttributes - the new number of attributespublic int getNumAttributes()
public java.lang.String numAttributesTipText()
public void setClassFlag(boolean classFlag)
classFlag - the new class flagpublic boolean getClassFlag()
public java.lang.String classFlagTipText()
public void setBooleanIndices(java.lang.String rangeList)
rangeList - a string representing the list of attributes. Since the
string will typically come from a user, attributes are indexed
from 1. java.lang.IllegalArgumentException - if an invalid range list is suppliedpublic void setBooleanCols(Range value)
value - the range to usepublic Range getBooleanCols()
public java.lang.String booleanColsTipText()
public void setNominalIndices(java.lang.String rangeList)
rangeList - a string representing the list of attributes. Since the
string will typically come from a user, attributes are indexed
from 1. java.lang.IllegalArgumentException - if an invalid range list is suppliedpublic void setNominalCols(Range value)
value - the range to usepublic Range getNominalCols()
public java.lang.String nominalColsTipText()
protected java.lang.String checkIndices()