Examples of guessParametersErrors()


Examples of org.apache.commons.math.estimation.LevenbergMarquardtEstimator.guessParametersErrors()

      double[][] cov = estimator.getCovariances(circle);
      assertEquals(1.839, cov[0][0], 0.001);
      assertEquals(0.731, cov[0][1], 0.001);
      assertEquals(cov[0][1], cov[1][0], 1.0e-14);
      assertEquals(0.786, cov[1][1], 0.001);
      double[] errors = estimator.guessParametersErrors(circle);
      assertEquals(1.384, errors[0], 0.001);
      assertEquals(0.905, errors[1], 0.001);
 
      // add perfect measurements and check errors are reduced
      double cx = circle.getX();
View Full Code Here

Examples of org.apache.commons.math.estimation.LevenbergMarquardtEstimator.guessParametersErrors()

      cov = estimator.getCovariances(circle);
      assertEquals(0.004, cov[0][0], 0.001);
      assertEquals(6.40e-7, cov[0][1], 1.0e-9);
      assertEquals(cov[0][1], cov[1][0], 1.0e-14);
      assertEquals(0.003, cov[1][1], 0.001);
      errors = estimator.guessParametersErrors(circle);
      assertEquals(0.004, errors[0], 0.001);
      assertEquals(0.004, errors[1], 0.001);

  }
View Full Code Here

Examples of org.apache.commons.math.estimation.LevenbergMarquardtEstimator.guessParametersErrors()

      });
    LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator();
    estimator.estimate(problem);
    assertEquals(0, estimator.getRMS(problem), 1.0e-10);
    try {
        estimator.guessParametersErrors(problem);
        fail("an exception should have been thrown");
    } catch (EstimationException ee) {
        // expected behavior
    } catch (Exception e) {
        fail("wrong exception caught");
View Full Code Here

Examples of org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizer.guessParametersErrors()

       
        optimum = optimizer.optimize(function, targets, weights, FIRST_GUESS);
       
        // Covariances and errors
        logger.debug("Fit: Calculate errors and covariances.");
        double[]   fitErrors     = optimizer.guessParametersErrors();
        double[][] fitCovariance = optimizer.getCovariances();
       
        // Calculate chi square
        double[] bestFit = optimum.getValue();
        double chi2 = 0.0;
View Full Code Here

Examples of org.apache.commons.math.optimization.general.LevenbergMarquardtOptimizer.guessParametersErrors()

   
    // BamFunction optimization
    VectorialPointValuePair optimum = optimizer.optimize(function, target, weight, FIRST_GUESS);
   
    // Covariances and errors
    double[]   fitErrors     = optimizer.guessParametersErrors();
    double[][] fitCovariance = optimizer.getCovariances();
   
    // Output values
    FitResults fitResults = new FitResults(
        optimum.getValue(), optimum.getPoint(), fitErrors, fitCovariance);
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.