|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectweka.datagenerators.Generator
Abstract class for data generators. -------------------------------------------------------------------
General options are:
-r string
Name of the relation of the generated dataset.
(default = name built using name of used generator and options)
-a num
Number of attributes. (default = 10)
-c num
Number of classes. (default = 2)
-n num
Number of examples. (default = 100)
-o filename
writes the generated dataset to the given file using ARFF-Format.
(default = stdout).
-------------------------------------------------------------------
Example usage as the main of a datagenerator called RandomGenerator:
public static void main(String [] args) {
try {
DataGenerator.makeData(new RandomGenerator(), argv);
} catch (Exception e) {
System.err.println(e.getMessage());
}
}
------------------------------------------------------------------
| Constructor Summary | |
Generator()
|
|
| Method Summary | |
boolean |
getDebug()
Gets the debug flag. |
int |
getNumAttributes()
Gets the number of attributes that should be produced. |
int |
getNumClasses()
Gets the number of classes the dataset should have. |
int |
getNumExamples()
Gets the number of examples, given by option. |
int |
getNumExamplesAct()
Gets the number of examples the dataset should have. |
java.io.PrintWriter |
getOutput()
Gets the print writer. |
java.lang.String |
getRelationName()
Gets the relation name the dataset should have. |
static void |
makeData(Generator generator,
java.lang.String[] options)
Calls the data generator. |
void |
setDebug(boolean debug)
Sets the debug flag. |
void |
setNumAttributes(int numAttributes)
Sets the number of attributes the dataset should have. |
void |
setNumClasses(int numClasses)
Sets the number of classes the dataset should have. |
void |
setNumExamples(int numExamples)
Sets the number of examples, given by option. |
void |
setNumExamplesAct(int numExamplesAct)
Sets the number of examples the dataset should have. |
void |
setOutput(java.io.PrintWriter newOutput)
Sets the print writer. |
void |
setRelationName(java.lang.String relationName)
Sets the relation name the dataset should have. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Generator()
| Method Detail |
public void setDebug(boolean debug)
debug - the new debug flagpublic boolean getDebug()
public void setRelationName(java.lang.String relationName)
relationName - the new relation namepublic java.lang.String getRelationName()
public void setNumClasses(int numClasses)
numClasses - the new number of classespublic int getNumClasses()
public void setNumExamples(int numExamples)
numExamples - the new number of examplespublic int getNumExamples()
public void setNumAttributes(int numAttributes)
numAttributes - the new number of attributespublic int getNumAttributes()
public void setNumExamplesAct(int numExamplesAct)
numExamplesAct - the new number of examplespublic int getNumExamplesAct()
public void setOutput(java.io.PrintWriter newOutput)
newOutput - the new print writerpublic java.io.PrintWriter getOutput()
public static void makeData(Generator generator,
java.lang.String[] options)
throws java.lang.Exception
options - options of the data generator
java.lang.Exception - if there was an error in the option list
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||