Package org.encog.util.csv

Examples of org.encog.util.csv.CSVFormat


    final File sourceFile = getScript().resolveFilename(sourceID);
    final File targetFile = getScript().resolveFilename(targetID);

    // get formats
    final CSVFormat inputFormat = getScript()
        .determineInputFormat(sourceID);
    final CSVFormat outputFormat = getScript().determineOutputFormat();

    // mark generated
    getScript().markGenerated(targetID);

    // prepare to normalize
View Full Code Here


  /**
   * Perform the analysis.
   * @param target The Encog analyst object to analyze.
   */
  public final void process(final EncogAnalyst target) {
    final CSVFormat csvFormat = ConvertStringConst
        .convertToCSVFormat(this.format);
    ReadCSV csv = new ReadCSV(this.filename, this.headers, csvFormat);

    // pass one, calculate the min/max
    while (csv.next()) {
View Full Code Here

    // mark generated
    getScript().markGenerated(targetID);

    // get formats
    final CSVFormat inputFormat = getScript()
        .determineInputFormat(sourceID);
    final CSVFormat outputFormat = getScript().determineOutputFormat();

    // prepare to normalize
    final BalanceCSV balance = new BalanceCSV();
    balance.setScript(getScript());
    getAnalyst().setCurrentQuantTask(balance);
View Full Code Here

   * Perform the analysis.
   * @param target The Encog analyst object to analyze.
   */
  public void process(final EncogAnalyst target) {
    int count = 0;
    final CSVFormat csvFormat = ConvertStringConst
        .convertToCSVFormat(this.format);
    ReadCSV csv = new ReadCSV(this.filename, this.headers, csvFormat);
   
    // pass one, calculate the min/max
    while (csv.next()) {
View Full Code Here

    // get filenames, headers & format
    String sourceID = prop.getPropertyString(
        ScriptProperties.HEADER_DATASOURCE_RAW_FILE);

    File sourceFile = this.analyst.getScript().resolveFilename(sourceID);
    CSVFormat inputFormat = this.analyst.getScript().determineFormat()
    boolean headers = this.analyst.getScript().expectInputHeaders(sourceID);
     
    // read the file
    this.rowCount = 0;
    this.missingCount = 0;
View Full Code Here

    // get filenames
    final String sourceID = getProp().getPropertyString(
        ScriptProperties.GENERATE_CONFIG_SOURCE_FILE);
    final String targetID = getProp().getPropertyString(
        ScriptProperties.GENERATE_CONFIG_TARGET_FILE);
    final CSVFormat format = getAnalyst().getScript().determineFormat();

    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "Beginning generate");
    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "source file:" + sourceID);
    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "target file:" + targetID);
View Full Code Here

    // mark generated
    getScript().markGenerated(targetID);

    // get formats
    final CSVFormat format = getScript().determineFormat();

    // prepare to normalize
    final AnalystNormalizeCSV norm = new AnalystNormalizeCSV();
    norm.setScript(getScript());
    getAnalyst().setCurrentQuantTask(norm);
View Full Code Here

    final File sourceFile = getScript().resolveFilename(sourceID);
    final File targetFile = getScript().resolveFilename(targetID);

    // get formats
    final CSVFormat format = getScript().determineFormat();

    // mark generated
    getScript().markGenerated(targetID);

    // prepare to normalize
View Full Code Here

   * @param af The analyst format.
   * @return The CSV format.
   */
  public static CSVFormat convertToCSVFormat(final AnalystFileFormat af) {
    if (af == AnalystFileFormat.DECPNT_COMMA) {
      return new CSVFormat('.', ',');
    } else if (af == AnalystFileFormat.DECPNT_SPACE) {
      return new CSVFormat('.', ' ');
    } else if (af == AnalystFileFormat.DECPNT_SEMI) {
      return new CSVFormat('.', ';');
    } else if (af == AnalystFileFormat.DECCOMMA_SPACE) {
      return new CSVFormat(',', ' ');
    } else if (af == AnalystFileFormat.DECCOMMA_SEMI) {
      return new CSVFormat(',', ';');
    } else {
      return null;
    }
  }
View Full Code Here

    // mark generated
    getScript().markGenerated(targetID);

    // get formats
    final CSVFormat format = getScript().determineFormat();

    // prepare to normalize
    final BalanceCSV balance = new BalanceCSV();
    balance.setScript(getScript());
    getAnalyst().setCurrentQuantTask(balance);
View Full Code Here

TOP

Related Classes of org.encog.util.csv.CSVFormat

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.