Examples of QuantError


Examples of org.encog.app.quant.QuantError

    int classNumber = lookup(str);
    if (classNumber == -1) {
      try {
        classNumber = Integer.parseInt(str);
      } catch (final NumberFormatException ex) {
        throw new QuantError("Can't determine class for: " + str);
      }
    }
    return encode(classNumber);

  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

   */
  public final void init() {

    if (this.action == NormalizationAction.Equilateral) {
      if (this.classes.size() < MIN_EQ_CLASSES) {
        throw new QuantError(
          "There must be at least three classes to make "
          + "use of equilateral normalization.");
      }

      this.eq = new Equilateral(this.classes.size(), this.normalizedHigh,
View Full Code Here

Examples of org.encog.app.quant.QuantError

      final int low) {

    if ((action != NormalizationAction.Equilateral)
        && (action != NormalizationAction.OneOf)
        && (action != NormalizationAction.SingleField)) {
      throw new QuantError("Unsupported normalization type");
    }

    this.action = theAction;
    this.classes.clear();
    this.normalizedHigh = high;
View Full Code Here

Examples of org.encog.app.quant.QuantError

      final String[] cls,
      final double high, final double low) {
    if ((action != NormalizationAction.Equilateral)
        && (action != NormalizationAction.OneOf)
        && (action != NormalizationAction.SingleField)) {
      throw new QuantError("Unsupported normalization type");
    }

    this.action = theAction;
    this.classes.clear();
    this.normalizedHigh = high;
View Full Code Here

Examples of org.encog.app.quant.QuantError

      }
      reportDone(false);
      csv.close();
      tw.close();
    } catch (IOException ex) {
      throw new QuantError(ex);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

   */
  private void validate() {
    validateAnalyzed();

    if (this.targets.size() < 1) {
      throw new QuantError("There are no segregation targets.");
    }

    if (this.targets.size() < 2) {
      throw new QuantError(
          "There must be at least two segregation targets.");
    }

    int total = 0;
    for (final SegregateTargetPercent p : this.targets) {
      total += p.getPercent();
    }

    if (total != TOTAL_PCT) {
      throw new QuantError("Target percents must equal 100.");
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

      }

      return tw;

    } catch (final IOException e) {
      throw new QuantError(e);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

      }

      return tw;

    } catch (final IOException e) {
      throw new QuantError(e);
    }
  }
View Full Code Here

Examples of org.encog.app.quant.QuantError

      if (headers) {
        recordCount--;
      }
      setRecordCount(recordCount);
    } catch (final IOException ex) {
      throw new QuantError(ex);
    } finally {
      reportDone(true);
      if (reader != null) {
        try {
          reader.close();
        } catch (final IOException e) {
          throw new QuantError(e);
        }
      }
      setInputFilename(input);
      setExpectInputHeaders(headers);
      setInputFormat(format);
    }

    // now analyze columns
    ReadCSV csv = null;
    try {
      csv = new ReadCSV(input.toString(), headers, format);
      if (!csv.next()) {
        throw new QuantError("File is empty");
      }

      for (int i = 0; i < csv.getColumnCount(); i++) {
        String name;
View Full Code Here

Examples of org.encog.app.quant.QuantError

          NumberList.toList(getOutputFormat(), line, output);
          tw.println(line);
        }
      }
    } catch (final IOException e) {
      throw new QuantError(e);
    } finally {
      reportDone(false);
      if (csv != null) {
        try {
          csv.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.