Example usage for weka.datagenerators.classifiers.classification RDG1 setMaxRuleSize

List of usage examples for weka.datagenerators.classifiers.classification RDG1 setMaxRuleSize

Introduction

In this page you can find the example usage for weka.datagenerators.classifiers.classification RDG1 setMaxRuleSize.

Prototype

public void setMaxRuleSize(int newMaxRuleSize) 

Source Link

Document

Sets the maximum number of tests in rules.

Usage

From source file:NLP.GenerateFile.java

License:Open Source License

/**
 * Generates the data. First parameter the ARFF file to write to. If omitted,
 * the data is written to stdout./*from w  w w  .  j av  a2s. c  o  m*/
 * 
 * @param args   the command-line parameters
 */
public static void main(String[] args) throws Exception {
    PrintWriter output;
    if (args.length == 0)
        output = new PrintWriter(System.out);
    else
        output = new PrintWriter(new BufferedWriter(new FileWriter(args[0])));
    RDG1 generator = new RDG1();
    generator.setMaxRuleSize(5);
    generator.setOutput(output);
    DataGenerator.makeData(generator, generator.getOptions());
    output.flush();
    output.close();
}