public class MexicanHat extends RegressionGenerator
-h Prints this help.
-o <file> The name of the output file, otherwise the generated data is printed to stdout.
-r <name> The name of the relation.
-d Whether to print debug informations.
-S The seed for random function (default 1)
-n <num> The number of examples to generate (default 100)
-A <num> The amplitude multiplier (default 1.0).
-R <num>..<num> The range x is randomly drawn from (default -10.0..10.0).
-N <num> The noise rate (default 0.0).
-V <num> The noise variance (default 1.0).
| Modifier and Type | Field and Description |
|---|---|
protected double |
m_Amplitude
the amplitude of y
|
protected double |
m_MaxRange
the upper boundary of the range, x is drawn from
|
protected double |
m_MinRange
the lower boundary of the range, x is drawn from
|
protected java.util.Random |
m_NoiseRandom
the random number generator for the noise
|
protected double |
m_NoiseRate
the rate of the gaussian noise
|
protected double |
m_NoiseVariance
the variance of the gaussian noise
|
m_NumExamplesm_CreatingRelationName, m_DatasetFormat, m_Debug, m_DefaultOutput, m_NumExamplesAct, m_OptionBlacklist, m_Output, m_Random, m_RelationName, m_Seed| Constructor and Description |
|---|
MexicanHat()
initializes the generator
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
amplitudeTipText()
Returns the tip text for this property
|
protected double |
defaultAmplitude()
returns the default amplitude
|
protected double |
defaultMaxRange()
returns the default max range
|
protected double |
defaultMinRange()
returns the default min range
|
protected double |
defaultNoiseRate()
returns the default gaussian noise rate
|
protected double |
defaultNoiseVariance()
returns the default variance of the noise rate
|
Instances |
defineDataFormat()
Initializes the format for the dataset produced.
|
Instance |
generateExample()
Generates one example of the dataset.
|
Instances |
generateExamples()
Generates all examples of the dataset.
|
java.lang.String |
generateFinished()
Generates a comment string that documentats the data generator.
|
java.lang.String |
generateStart()
Generates a comment string that documentates the data generator.
|
double |
getAmplitude()
Gets the amplitude multiplier.
|
double |
getMaxRange()
Gets the upper boundary for the range of x
|
double |
getMinRange()
Gets the lower boundary for the range of x
|
double |
getNoiseRate()
Gets the gaussian noise rate.
|
double |
getNoiseVariance()
Gets the noise variance
|
java.lang.String[] |
getOptions()
Gets the current settings of the datagenerator BIRCHCluster.
|
protected java.lang.String |
getRange()
Gets the upper and lower boundary for the range of x
|
java.lang.String |
getRevision()
Returns the revision string.
|
boolean |
getSingleModeFlag()
Return if single mode is set for the given data generator mode depends on
option setting and or generator type.
|
java.lang.String |
globalInfo()
Returns a string describing this data generator.
|
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.
|
java.lang.String |
maxRangeTipText()
Returns the tip text for this property
|
java.lang.String |
minRangeTipText()
Returns the tip text for this property
|
java.lang.String |
noiseRateTipText()
Returns the tip text for this property
|
java.lang.String |
noiseVarianceTipText()
Returns the tip text for this property
|
protected java.lang.String |
rangeTipText()
Returns the tip text for this property
|
void |
setAmplitude(double value)
Sets the amplitude multiplier.
|
void |
setMaxRange(double value)
Sets the upper boundary for the range of x
|
void |
setMinRange(double value)
Sets the lower boundary for the range of x
|
void |
setNoiseRate(double value)
Sets the gaussian noise rate.
|
void |
setNoiseVariance(double value)
Sets the noise variance
|
void |
setOptions(java.lang.String[] options)
Parses a list of options for this object.
|
protected void |
setRange(java.lang.String fromTo)
Sets the upper and lower boundary for the range of x
|
defaultNumExamples, getNumExamples, numExamplesTipText, setNumExamplesaddToBlacklist, clearBlacklist, debugTipText, defaultNumExamplesAct, defaultOutput, defaultRelationName, defaultSeed, enumToVector, formatTipText, getDatasetFormat, getDebug, getEpilogue, getNumExamplesAct, getOutput, getPrologue, getRandom, getRelationName, getRelationNameToUse, getSeed, isOnBlacklist, makeData, makeOptionString, numExamplesActTipText, outputTipText, randomTipText, relationNameTipText, removeBlacklist, runDataGenerator, seedTipText, setDatasetFormat, setDebug, setNumExamplesAct, setOutput, setRandom, setRelationName, setSeed, toStringFormatprotected double m_Amplitude
protected double m_MinRange
protected double m_MaxRange
protected double m_NoiseRate
protected double m_NoiseVariance
protected java.util.Random m_NoiseRandom
public java.lang.String globalInfo()
public java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class RegressionGeneratorpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-h Prints this help.
-o <file> The name of the output file, otherwise the generated data is printed to stdout.
-r <name> The name of the relation.
-d Whether to print debug informations.
-S The seed for random function (default 1)
-n <num> The number of examples to generate (default 100)
-A <num> The amplitude multiplier (default 1.0).
-R <num>..<num> The range x is randomly drawn from (default -10.0..10.0).
-N <num> The noise rate (default 0.0).
-V <num> The noise variance (default 1.0).
setOptions in interface OptionHandlersetOptions in class RegressionGeneratoroptions - 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 RegressionGeneratorDataGenerator.removeBlacklist(String[])protected double defaultAmplitude()
public double getAmplitude()
public void setAmplitude(double value)
value - the amplitude multiplierpublic java.lang.String amplitudeTipText()
protected void setRange(java.lang.String fromTo)
fromTo - the string containing the upper and lower boundary for the
range of x, separated by ..protected java.lang.String getRange()
protected java.lang.String rangeTipText()
protected double defaultMinRange()
public void setMinRange(double value)
value - the lower boundarypublic double getMinRange()
public java.lang.String minRangeTipText()
protected double defaultMaxRange()
public void setMaxRange(double value)
value - the upper boundarypublic double getMaxRange()
public java.lang.String maxRangeTipText()
protected double defaultNoiseRate()
public double getNoiseRate()
public void setNoiseRate(double value)
value - the gaussian noise ratepublic java.lang.String noiseRateTipText()
protected double defaultNoiseVariance()
public double getNoiseVariance()
public void setNoiseVariance(double value)
value - the noise variancepublic java.lang.String noiseVarianceTipText()
public boolean getSingleModeFlag()
throws java.lang.Exception
getSingleModeFlag in class DataGeneratorjava.lang.Exception - if mode is not set yetpublic Instances defineDataFormat() throws java.lang.Exception
defineDataFormat in class DataGeneratorjava.lang.Exception - if the generating of the format failedDataGenerator.getSeed()public Instance generateExample() throws java.lang.Exception
generateExample in class DataGeneratorjava.lang.Exception - if the format of the dataset is not yet definedjava.lang.Exception - if the generator only works with generateExamples which
means in non single modepublic Instances generateExamples() throws java.lang.Exception
generateExamples in class DataGeneratorjava.lang.Exception - if the format of the dataset is not yet definedjava.lang.Exception - if the generator only works with generateExample, which
means in single modeDataGenerator.getSeed()public java.lang.String generateStart()
generateStart in class DataGeneratorpublic java.lang.String generateFinished()
throws java.lang.Exception
generateFinished in class DataGeneratorjava.lang.Exception - if the generating of the documentaion failspublic java.lang.String getRevision()
public static void main(java.lang.String[] args)
args - should contain arguments for the data producer: