Package org.encog.ml.fitting.linear

Examples of org.encog.ml.fitting.linear.LinearRegression.calculateError()


    TrainLinearRegression train = new TrainLinearRegression(lin,data);
    train.iteration();
   
    System.out.println("w0 = " + Format.formatDouble(lin.getWeights()[0],2));
    System.out.println("w1 = " + Format.formatDouble(lin.getWeights()[1],2));
    System.out.println("Error: " + lin.calculateError(data));
  }
 
  public void testLinear2() {
    double[][] INPUT = { {2}, {4}, {6}, {8} };
    double[][] IDEAL = { {2}, {5}, {5}, {8} };
View Full Code Here


    LinearRegression lin = new LinearRegression(1);
    TrainLinearRegression train = new TrainLinearRegression(lin,data);
    train.iteration();
    System.out.println("w0 = " + Format.formatDouble(lin.getWeights()[0],2));
    System.out.println("w1 = " + Format.formatDouble(lin.getWeights()[1],2));
    System.out.println("Error: " + lin.calculateError(data));
  }
}
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.