Package org.encog.app.analyst.csv.segregate

Examples of org.encog.app.analyst.csv.segregate.SegregateTargetPercent


    public void testFilterCSVHeaders() throws IOException
    {
        generateTestFileHeadings(true);
        SegregateCSV norm = new SegregateCSV();
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT1_NAME, 75));
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT2_NAME, 25));
        norm.analyze(INPUT_NAME, true, CSVFormat.ENGLISH);           
        norm.process();

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT1_NAME));
        Assert.assertEquals("\"a\",\"b\"",tr.readLine());
View Full Code Here


    public void testFilterCSVNoHeaders() throws IOException
    {
        generateTestFileHeadings(false);
        SegregateCSV norm = new SegregateCSV();
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT1_NAME, 75));
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT2_NAME, 25));
        norm.analyze(INPUT_NAME, false, CSVFormat.ENGLISH);
        norm.setProduceOutputHeaders(false);
        norm.process();

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT1_NAME));
View Full Code Here

    getAnalyst().setCurrentQuantTask(seg);
    for (final AnalystSegregateTarget target : getScript().getSegregate()
        .getSegregateTargets()) {
      final File filename = getScript().resolveFilename(target.getFile());
      seg.getTargets().add(
          new SegregateTargetPercent(filename, target.getPercent()));
      // mark generated
      getScript().markGenerated(target.getFile());
      EncogLogging.log(EncogLogging.LEVEL_DEBUG, "target file:"
          + target.getFile() + ", Percent: "
          + Format.formatPercent(target.getPercent()));
View Full Code Here

    getAnalyst().setCurrentQuantTask(seg);
    for (final AnalystSegregateTarget target : getScript().getSegregate()
        .getSegregateTargets()) {
      final File filename = getScript().resolveFilename(target.getFile());
      seg.getTargets().add(
          new SegregateTargetPercent(filename, target.getPercent()));
      // mark generated
      getScript().markGenerated(target.getFile());
      EncogLogging.log(EncogLogging.LEVEL_DEBUG, "target file:"
          + target.getFile() + ", Percent: "
          + Format.formatPercent(target.getPercent()));
View Full Code Here

    public void testFilterCSVHeaders() throws IOException
    {
        generateTestFileHeadings(true);
        SegregateCSV norm = new SegregateCSV();
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT1_NAME, 75));
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT2_NAME, 25));
        norm.analyze(INPUT_NAME, true, CSVFormat.ENGLISH);           
        norm.process();

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT1_NAME));
        Assert.assertEquals("\"a\",\"b\"",tr.readLine());
View Full Code Here

    public void testFilterCSVNoHeaders() throws IOException
    {
        generateTestFileHeadings(false);
        SegregateCSV norm = new SegregateCSV();
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT1_NAME, 75));
        norm.getTargets().add(new SegregateTargetPercent(OUTPUT2_NAME, 25));
        norm.analyze(INPUT_NAME, false, CSVFormat.ENGLISH);
        norm.setProduceOutputHeaders(false);
        norm.process();

        BufferedReader tr = new BufferedReader(new FileReader(OUTPUT1_NAME));
View Full Code Here

TOP

Related Classes of org.encog.app.analyst.csv.segregate.SegregateTargetPercent

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.