Package org.encog.util.arrayutil

Examples of org.encog.util.arrayutil.NormalizeArray


  private double[] normalizedSunspots;
  private double[] closedLoopSunspots;
 
  public void normalizeSunspots(double lo, double hi) {
        NormalizeArray norm = new NormalizeArray();
        norm.setNormalizedHigh( hi);
        norm.setNormalizedLow( lo);

        // create arrays to hold the normalized sunspots
        normalizedSunspots = norm.process(SUNSPOTS);
        double[] test = norm.process(SUNSPOTS);
        closedLoopSunspots = EngineArray.arrayCopy(normalizedSunspots);

  }
View Full Code Here


  private double[] normalizedSunspots;
  private double[] closedLoopSunspots;
 
  public void normalizeSunspots(double lo, double hi) {
        NormalizeArray norm = new NormalizeArray();
        norm.setNormalizedHigh( hi);
        norm.setNormalizedLow( lo);

        // create arrays to hold the normalized sunspots
        normalizedSunspots = norm.process(SUNSPOTS);
        double[] test = norm.process(SUNSPOTS);
        closedLoopSunspots = EngineArray.arrayCopy(normalizedSunspots);

  }
View Full Code Here

public class TestNormalizeArray extends TestCase {

    public void testNormalize()
    {
        NormalizeArray norm = new NormalizeArray();
        double[] input = { 1,5,10 };
        double[] output = norm.process(input);
        Assert.assertEquals(3, output.length);
        Assert.assertEquals(-1.0, output[0]);
        Assert.assertEquals(1.0, output[2]);
        Assert.assertEquals(1.0, norm.getStats().getActualLow());
        Assert.assertEquals(10.0, norm.getStats().getActualHigh());
    }
View Full Code Here

  private double[] normalizedSunspots;
  private double[] closedLoopSunspots;

  public void normalizeSunspots(double lo, double hi) {
        NormalizeArray norm = new NormalizeArray();
        norm.setNormalizedHigh( hi);
        norm.setNormalizedLow( lo);

        // create arrays to hold the normalized sunspots
        normalizedSunspots = norm.process(SUNSPOTS);
        double[] test = norm.process(SUNSPOTS);
        closedLoopSunspots = EngineArray.arrayCopy(normalizedSunspots);

  }
View Full Code Here

  private double[] normalizedSunspots;
  private double[] closedLoopSunspots;
 
  public void normalizeSunspots(double lo, double hi) {
        NormalizeArray norm = new NormalizeArray();
        norm.setNormalizedHigh( hi);
        norm.setNormalizedLow( lo);

        // create arrays to hold the normalized sunspots
        normalizedSunspots = norm.process(SUNSPOTS);
        closedLoopSunspots = EngineArray.arrayCopy(normalizedSunspots);

  }
View Full Code Here

public class TestNormalizeArray extends TestCase {

    public void testNormalize()
    {
        NormalizeArray norm = new NormalizeArray();
        double[] input = { 1,5,10 };
        double[] output = norm.process(input);
        Assert.assertEquals(3, output.length);
        Assert.assertEquals(-1.0, output[0]);
        Assert.assertEquals(1.0, output[2]);
        Assert.assertEquals(1.0, norm.getStats().getActualLow());
        Assert.assertEquals(10.0, norm.getStats().getActualHigh());
    }
View Full Code Here

TOP

Related Classes of org.encog.util.arrayutil.NormalizeArray

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.