public class Expression extends MexicanHat
-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).
-E <expression> The expression to use for generating y out of x (default sin(abs(a1)) / abs(a1)).
AddExpression,
MexicanHat,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected String |
m_Expression
the expression for computing y
|
protected AddExpression |
m_Filter
the filter for generating y out of x
|
protected Instances |
m_RawData
the input data structure for the filter
|
m_Amplitude, m_MaxRange, m_MinRange, m_NoiseRandom, m_NoiseRate, m_NoiseVariancem_NumExamplesm_CreatingRelationName, m_DatasetFormat, m_Debug, m_DefaultOutput, m_NumExamplesAct, m_OptionBlacklist, m_Output, m_Random, m_RelationName, m_Seed| Constructor and Description |
|---|
Expression()
initializes the generator
|
| Modifier and Type | Method and Description |
|---|---|
String |
amplitudeTipText()
Returns the tip text for this property
|
protected String |
defaultExpression()
returns the default expression
|
Instances |
defineDataFormat()
Initializes the format for the dataset produced.
|
String |
expressionTipText()
Returns the tip text for this property
|
Instance |
generateExample()
Generates one example of the dataset.
|
Instances |
generateExamples()
Generates all examples of the dataset.
|
String |
generateFinished()
Generates a comment string that documentats the data generator.
|
String |
generateStart()
Generates a comment string that documentates the data generator.
|
String |
getExpression()
Gets the mathematical expression for generating y out of x
|
String[] |
getOptions()
Gets the current settings of the datagenerator BIRCHCluster.
|
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.
|
String |
globalInfo()
Returns a string describing this data generator.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for testing this class.
|
void |
setExpression(String value)
Sets the mathematical expression to generate y out of x.
|
void |
setOptions(String[] options)
Parses a list of options for this object.
|
defaultAmplitude, defaultMaxRange, defaultMinRange, defaultNoiseRate, defaultNoiseVariance, getAmplitude, getMaxRange, getMinRange, getNoiseRate, getNoiseVariance, getRange, maxRangeTipText, minRangeTipText, noiseRateTipText, noiseVarianceTipText, rangeTipText, setAmplitude, setMaxRange, setMinRange, setNoiseRate, setNoiseVariance, setRangedefaultNumExamples, getNumExamples, numExamplesTipText, setNumExamplesaddToBlacklist, clearBlacklist, debugTipText, defaultNumExamplesAct, defaultOutput, defaultRelationName, defaultSeed, enumToVector, formatTipText, getDatasetFormat, getDebug, getNumExamplesAct, getOutput, getRandom, getRelationName, getRelationNameToUse, getSeed, isOnBlacklist, makeData, makeOptionString, numExamplesActTipText, outputTipText, randomTipText, relationNameTipText, removeBlacklist, runDataGenerator, seedTipText, setDatasetFormat, setDebug, setNumExamplesAct, setOutput, setRandom, setRelationName, setSeed, toStringFormatprotected String m_Expression
protected AddExpression m_Filter
protected Instances m_RawData
public String globalInfo()
globalInfo in class MexicanHatpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class MexicanHatpublic void setOptions(String[] options) throws 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).
-E <expression> The expression to use for generating y out of x (default sin(abs(a1)) / abs(a1)).
setOptions in interface OptionHandlersetOptions in class MexicanHatoptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class MexicanHatDataGenerator.removeBlacklist(String[])public String amplitudeTipText()
amplitudeTipText in class MexicanHatprotected String defaultExpression()
public String getExpression()
public void setExpression(String value)
value - the expression for computing ypublic String expressionTipText()
public boolean getSingleModeFlag()
throws Exception
getSingleModeFlag in class MexicanHatException - if mode is not set yetpublic Instances defineDataFormat() throws Exception
defineDataFormat in class MexicanHatException - if the generating of the format failedDataGenerator.getSeed()public Instance generateExample() throws Exception
generateExample in class MexicanHatException - if the format of the dataset is not yet definedException - if the generator only works with generateExamples
which means in non single modepublic Instances generateExamples() throws Exception
generateExamples in class MexicanHatException - if the format of the dataset is not yet definedException - if the generator only works with generateExample,
which means in single modeDataGenerator.getSeed()public String generateStart()
generateStart in class MexicanHatpublic String generateFinished() throws Exception
generateFinished in class MexicanHatException - if the generating of the documentaion failspublic String getRevision()
getRevision in interface RevisionHandlergetRevision in class MexicanHatpublic static void main(String[] args)
args - should contain arguments for the data producer:Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.