Examples of fit()


Examples of com.nr.model.Fitlin.fit()

//    }
//    System.out.printf(endl;

    // Now free one of the fixed parameters
    myfit.free(1);
    myfit.fit();

    localflag = (myfit.a[1] == amp[1]);
    globalflag = globalflag || localflag;
    if (localflag) {
      fail("*** Fitlin: A free parameter still has its assigned value");
View Full Code Here

Examples of com.nr.model.Fitmrq.fit()

      y[i] *= (1.0+SPREAD*ndev.dev());
      sig[i]=SPREAD*y[i];
    }
    FGauss fgauss = new FGauss();
    Fitmrq myfit=new Fitmrq(x,y,sig,guess,fgauss);
    myfit.fit();

//    System.out.printf(setw(18) << "chi-squared:%f\n", setw(13) << myfit.chisq);
//    System.out.printf(fixed << setprecision(6);
//    for (i=0;i<MA;i++) System.out.printf(setw(9) << myfit.a[i];
//    System.out.printf(endl;
View Full Code Here

Examples of com.nr.model.Fitmrq.fit()

    }

    // Test the hold() method on parameters 1 and 4
    myfit.hold(1,2.0);
    myfit.hold(4,5.0);
    myfit.fit();

//    System.out.printf(setw(18) << "chi-squared:%f\n", setw(13) << myfit.chisq);
//    for (i=0;i<MA;i++) System.out.printf(setw(9) << myfit.a[i];
//    System.out.printf(endl;
//    System.out.println("Uncertainties:");
View Full Code Here

Examples of com.nr.model.Fitmrq.fit()

     
    }

    // Test the free() method
    myfit.free(1);
    myfit.fit();

//    System.out.printf(setw(18) << "chi-squared:%f\n", setw(13) << myfit.chisq);
//    for (i=0;i<MA;i++) System.out.printf(setw(9) << myfit.a[i];
//    System.out.printf(endl;
//    System.out.println("Uncertainties:");
View Full Code Here

Examples of com.nr.model.Fitsvd.fit()

      y[i] += ndev.dev();
      sig[i]=stdev;
    }

    Fitsvd myfit=new Fitsvd(x,y,sig,this,TOL);
    myfit.fit();

    for (j=0;j<NP;j++) {
//      System.out.printf(myfit.a[j] << " %f\n", amp[j] << " " ;
//      System.out.printf(sqrt(myfit.covar[j][j]));
View Full Code Here

Examples of com.nr.model.Fitsvd.fit()

      y[i] += ndev.dev();
      sig[i]=stdev;
    }

    Fitsvd myfit = new Fitsvd(x,y,sig,this,TOL);
    myfit.fit();

    for (j=0;j<NP;j++) {
//      System.out.printf(myfit.a[j] << " %f\n", amp[j] << " " ;
//      System.out.printf(sqrt(myfit.covar[j][j]));
View Full Code Here

Examples of com.nr.model.Fitsvd.fit()

      y[i] += ndev.dev();
      sig[i]=stdev;
    }

    Fitsvd mysvdfit = new Fitsvd(x,y,sig,this,TOL);
    mysvdfit.fit();

    for (j=0;j<ma;j++) {
      localflag = abs(mysvdfit.a[j]-amp[j]) > 2.0*sqrt(mysvdfit.covar[j][j]);
      globalflag = globalflag || localflag;
      if (localflag) {
View Full Code Here

Examples of jaolho.data.lma.LMA.fit()

      }
      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.fit()

      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.fit()

  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
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.