Package org.encog.app.analyst.script.task

Examples of org.encog.app.analyst.script.task.AnalystTask


   * @param name The name of the task to execute.
   */
  public final void executeTask(final String name) {
    EncogLogging.log(EncogLogging.LEVEL_INFO,
        "Analyst execute task:" + name);
    final AnalystTask task = this.script.getTask(name);
    if (task == null) {
      throw new AnalystError("Can't find task: " + name);
    }

    executeTask(task);
View Full Code Here


  /**
   * Generate the tasks.
   */
  private void generateTasks() {
    final AnalystTask task1 = new AnalystTask(EncogAnalyst.TASK_FULL);
    if (!this.timeSeries && this.taskRandomize) {
      task1.getLines().add("randomize");
    }

    if (!this.timeSeries && this.taskBalance) {
      task1.getLines().add("balance");
    }

    if (this.taskSegregate) {
      task1.getLines().add("segregate");
    }

    if (this.taskNormalize) {
      task1.getLines().add("normalize");
    }

    task1.getLines().add("generate");
    task1.getLines().add("create");
    task1.getLines().add("train");
    task1.getLines().add("evaluate");

    final AnalystTask task2 = new AnalystTask("task-generate");
    if (!this.timeSeries && this.taskRandomize) {
      task2.getLines().add("randomize");
    }

    if (this.taskSegregate) {
      task2.getLines().add("segregate");
    }
    if (this.taskNormalize) {
      task2.getLines().add("normalize");
    }
    task2.getLines().add("generate");

    final AnalystTask task3 = new AnalystTask("task-evaluate-raw");
    task3.getLines().add(
        createSet(ScriptProperties.ML_CONFIG_EVAL_FILE,
            AnalystWizard.FILE_EVAL_NORM));
    task3.getLines().add(
        createSet(ScriptProperties.NORMALIZE_CONFIG_SOURCE_FILE,
            AnalystWizard.FILE_EVAL));
    task3.getLines().add(
        createSet(ScriptProperties.NORMALIZE_CONFIG_TARGET_FILE,
            AnalystWizard.FILE_EVAL_NORM));
    task3.getLines().add("normalize");
    task3.getLines().add("evaluate-raw");

    final AnalystTask task4 = new AnalystTask("task-create");
    task4.getLines().add("create");

    final AnalystTask task5 = new AnalystTask("task-train");
    task5.getLines().add("train");

    final AnalystTask task6 = new AnalystTask("task-evaluate");
    task6.getLines().add("evaluate");

    final AnalystTask task7 = new AnalystTask("task-cluster");
    task7.getLines().add("cluster");

    this.script.addTask(task1);
    this.script.addTask(task2);
    this.script.addTask(task3);
    this.script.addTask(task4);
View Full Code Here

  /**
   * Handle loading a task.
   * @param section The section.
   */
  private void handleTask(final EncogFileSection section) {
    final AnalystTask task = new AnalystTask(section.getSubSectionName());
    for (final String line : section.getLines()) {
      task.getLines().add(line);
    }
    this.script.addTask(task);
  }
View Full Code Here

    out.addSection("TASKS");
    final List<String> list = new ArrayList<String>();
    list.addAll(this.script.getTasks().keySet());
    Collections.sort(list);
    for (final String key : list) {
      final AnalystTask task = this.script.getTask(key);
      out.addSubSection(task.getName());
      for (final String line : task.getLines()) {
        out.addLine(line);
      }
    }
  }
View Full Code Here

  /**
   * Generate the tasks.
   */
  private void generateTasks() {
    final AnalystTask task1 = new AnalystTask(EncogAnalyst.TASK_FULL);
    if (this.preprocess) {
      task1.getLines().add("process");
    }

    if (!this.timeSeries && this.taskRandomize) {
      task1.getLines().add("randomize");
    }

    if (!this.timeSeries && this.taskBalance) {
      task1.getLines().add("balance");
    }

    if (this.taskSegregate) {
      task1.getLines().add("segregate");
    }

    if (this.taskNormalize) {
      task1.getLines().add("normalize");
    }

    task1.getLines().add("generate");
    task1.getLines().add("create");
    task1.getLines().add("train");
    task1.getLines().add("evaluate");

    if (this.codeTargetLanguage != TargetLanguage.NoGeneration) {
      task1.getLines().add("code");
    }

    final AnalystTask task2 = new AnalystTask("task-generate");
    if (!this.timeSeries && this.taskRandomize) {
      task2.getLines().add("randomize");
    }

    if (this.taskSegregate) {
      task2.getLines().add("segregate");
    }
    if (this.taskNormalize) {
      task2.getLines().add("normalize");
    }
    task2.getLines().add("generate");

    final AnalystTask task3 = new AnalystTask("task-evaluate-raw");
    task3.getLines().add(
        createSet(ScriptProperties.ML_CONFIG_EVAL_FILE,
            AnalystWizard.FILE_EVAL_NORM));
    task3.getLines().add(
        createSet(ScriptProperties.NORMALIZE_CONFIG_SOURCE_FILE,
            AnalystWizard.FILE_EVAL));
    task3.getLines().add(
        createSet(ScriptProperties.NORMALIZE_CONFIG_TARGET_FILE,
            AnalystWizard.FILE_EVAL_NORM));
    task3.getLines().add("normalize");
    task3.getLines().add("evaluate-raw");

    final AnalystTask task4 = new AnalystTask("task-create");
    task4.getLines().add("create");

    final AnalystTask task5 = new AnalystTask("task-train");
    task5.getLines().add("train");

    final AnalystTask task6 = new AnalystTask("task-evaluate");
    task6.getLines().add("evaluate");

    final AnalystTask task7 = new AnalystTask("task-cluster");
    task7.getLines().add("cluster");

    final AnalystTask task8 = new AnalystTask("task-code");
    task8.getLines().add("code");

    AnalystTask task9 = null;
    if (this.preprocess) {
      task9 = new AnalystTask("task-preprocess");
      task9.getLines().add("process");
    }

    this.script.addTask(task1);
    this.script.addTask(task2);
    this.script.addTask(task3);
View Full Code Here

   * @param name The name of the task to execute.
   */
  public void executeTask(final String name) {
    EncogLogging.log(EncogLogging.LEVEL_INFO,
        "Analyst execute task:" + name);
    final AnalystTask task = this.script.getTask(name);
    if (task == null) {
      throw new AnalystError("Can't find task: " + name);
    }

    executeTask(task);
View Full Code Here

   *
   * @param section
   *            The section.
   */
  private void handleTask(final EncogFileSection section) {
    final AnalystTask task = new AnalystTask(section.getSubSectionName());
    for (final String line : section.getLines()) {
      task.getLines().add(line);
    }
    this.script.addTask(task);
  }
View Full Code Here

    out.addSection("TASKS");
    final List<String> list = new ArrayList<String>();
    list.addAll(this.script.getTasks().keySet());
    Collections.sort(list);
    for (final String key : list) {
      final AnalystTask task = this.script.getTask(key);
      out.addSubSection(task.getName());
      for (final String line : task.getLines()) {
        out.addLine(line);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.encog.app.analyst.script.task.AnalystTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.