Examples of LMA


Examples of jaolho.data.lma.LMA

      params = new double[nombreParams];
      for (int i = 0; i < params.length; i++) {
        params[i] = 1;
      }
      double[][] tabXY = tableur.donneTableau(nomX, nomY);
      LMA lma = new LMA(func, params, tabXY);
      lma.verbose = true;
      try {
        lma.fit();

        double[] vraie = tabXY[1];
        double[] abcisse = tabXY[0];
        double[] fausse = func.generateData(abcisse, lma.parameters);
        double erreur = Stats.getErreur(vraie, fausse);
View Full Code Here

Examples of jaolho.data.lma.LMA

    }
  }
 
  /** Does the actual fitting by using the above ExampleFunction (a line) */
  public static void main(String[] args) {
    LMA lma = new LMA(
      new ExampleFunction(),
      new double[] {1, 1},
      new double[][] {
        {0, 2, 6, 8, 9},
        {5, 10, 23, 33, 40}}
    );
    lma.fit();
    System.out.println("iterations: " + lma.iterationCount);
    System.out.println("chi2: " + lma.chi2 + ", param0: " + lma.parameters[0] + ", param1: " + lma.parameters[1]);
  }
View Full Code Here

Examples of jaolho.data.lma.LMA

 
  public static void main(String[] args) {
    double[] x = {0.0, 0.1, 0.2, 0.3, 0.5, 0.7};//, 1.1, 1.4, 2.5, 6.4, 7.9, 10.4, 12.6};
    double[] a = {2.2, 0.4};
    double[][] data = {x, sin.generateData(x, a)};
    LMA lma = new LMA(sin, new double[] {0.1, 10}, data, null);
    lma.fit();
    System.out.println("RESULT PARAMETERS: " + Arrays.toString(lma.parameters));
   
    /*
    ArrayTool.writeToFileByColumns("fittest.dat", data);
    GnuPlotTool2.plot(ArrayTool.toFloatArray(data));
View Full Code Here

Examples of jaolho.data.lma.LMA

    }
  }
 
  /** Does the actual fitting by using the above MultiDimExampleFunction (a plane) */
  public static void main(String[] args) {
    LMA lma = new LMA(
      new MultiDimExampleFunction(),
      new double[] {1, 1, 1},
      new double[][] {
        // y x0 x1
        {0, 2, 6},
        {5, 10, 2},
        {7, 20, 4},
        {9, 30, 7},
        {12, 40, 6}
      }
    );
    lma.fit();
    System.out.println("iterations: " + lma.iterationCount);
    System.out.println(
      "chi2: " + lma.chi2 + ",\n" +
      "param0: " + lma.parameters[0] + ",\n" +
      "param1: " + lma.parameters[1] + ",\n" +
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.