Examples of estimate()


Examples of org.apache.commons.math.estimation.GaussNewtonEstimator.estimate()

      circle.addPoint(110.0, -20.0);
      circle.addPoint( 35.015.0);
      circle.addPoint( 45.097.0);
      try {
        GaussNewtonEstimator estimator = new GaussNewtonEstimator(4, 1.0e-14, 1.0e-14);
        estimator.estimate(circle);
        fail("an exception should have been caught");
      } catch (EstimationException ee) {
        // expected behavior
      } catch (Exception e) {
        fail("wrong exception type caught");
View Full Code Here

Examples of org.apache.commons.math.estimation.GaussNewtonEstimator.estimate()

      circle.addPoint( 50.0,  -6.0);
      circle.addPoint(110.0, -20.0);
      circle.addPoint( 35.015.0);
      circle.addPoint( 45.097.0);
      GaussNewtonEstimator estimator = new GaussNewtonEstimator(100, 1.0e-10, 1.0e-10);
      estimator.estimate(circle);
      double rms = estimator.getRMS(circle);
      assertEquals(1.768262623567235,  Math.sqrt(circle.getM()) * rms,  1.0e-10);
      assertEquals(69.96016176931406, circle.getRadius(), 1.0e-10);
      assertEquals(96.07590211815305, circle.getX(),      1.0e-10);
      assertEquals(48.13516790438953, circle.getY(),      1.0e-10);
View Full Code Here

Examples of org.apache.commons.math.estimation.GaussNewtonEstimator.estimate()

    for (int i = 0; i < points.length; ++i) {
      circle.addPoint(points[i][0], points[i][1]);
    }
    GaussNewtonEstimator estimator = new GaussNewtonEstimator(100, 1.0e-6, 1.0e-6);
    try {
        estimator.estimate(circle);
        fail("an exception should have been caught");
    } catch (EstimationException ee) {
        // expected behavior
    } catch (Exception e) {
        fail("wrong exception type caught");
View Full Code Here

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

    estimator.setCostRelativeTolerance(Math.sqrt(2.22044604926e-16));
    estimator.setParRelativeTolerance(Math.sqrt(2.22044604926e-16));
    estimator.setOrthoTolerance(2.22044604926e-16);
    assertTrue(function.checkTheoreticalStartCost(estimator.getRMS(function)));
    try {
      estimator.estimate(function);
      assertFalse(exceptionExpected);
    } catch (EstimationException lsse) {
      assertTrue(exceptionExpected);
    }
    assertTrue(function.checkTheoreticalMinCost(estimator.getRMS(function)));
View Full Code Here

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

            for (int i = 0; i < angles.length; ++i) {
                problem.addAngularMeasurement(3.0e7, angles[i][0], angles[i][1]);
            };

            LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator();
            estimator.estimate(problem);
            System.out.println("initial position: " + problem.getX0() + " " + problem.getY0());
            System.out.println("velocity: " + problem.getVx0() + " " + problem.getVy0());

        } catch (EstimationException ee) {
          System.err.println(ee.getMessage());
View Full Code Here

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

    estimator.setCostRelativeTolerance(FastMath.sqrt(2.22044604926e-16));
    estimator.setParRelativeTolerance(FastMath.sqrt(2.22044604926e-16));
    estimator.setOrthoTolerance(2.22044604926e-16);
    assertTrue(function.checkTheoreticalStartCost(estimator.getRMS(function)));
    try {
      estimator.estimate(function);
      assertFalse(exceptionExpected);
    } catch (EstimationException lsse) {
      assertTrue(exceptionExpected);
    }
    assertTrue(function.checkTheoreticalMinCost(estimator.getRMS(function)));
View Full Code Here

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

    estimator.setCostRelativeTolerance(Math.sqrt(2.22044604926e-16));
    estimator.setParRelativeTolerance(Math.sqrt(2.22044604926e-16));
    estimator.setOrthoTolerance(2.22044604926e-16);
    assertTrue(function.checkTheoreticalStartCost(estimator.getRMS(function)));
    try {
      estimator.estimate(function);
      assertFalse(exceptionExpected);
    } catch (EstimationException lsse) {
      assertTrue(exceptionExpected);
    }
    assertTrue(function.checkTheoreticalMinCost(estimator.getRMS(function)));
View Full Code Here

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

    estimator.setCostRelativeTolerance(Math.sqrt(2.22044604926e-16));
    estimator.setParRelativeTolerance(Math.sqrt(2.22044604926e-16));
    estimator.setOrthoTolerance(2.22044604926e-16);
    assertTrue(function.checkTheoreticalStartCost(estimator.getRMS(function)));
    try {
      estimator.estimate(function);
      assertFalse(exceptionExpected);
    } catch (EstimationException lsse) {
      assertTrue(exceptionExpected);
    }
    assertTrue(function.checkTheoreticalMinCost(estimator.getRMS(function)));
View Full Code Here

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

      circle.addPoint( 50.0,  -6.0);
      circle.addPoint(110.0, -20.0);
      circle.addPoint( 35.015.0);
      circle.addPoint( 45.097.0);
      LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator();
      estimator.estimate(circle);
      assertTrue(estimator.getCostEvaluations() < 10);
      assertTrue(estimator.getJacobianEvaluations() < 10);
      double rms = estimator.getRMS(circle);
      assertEquals(1.768262623567235,  Math.sqrt(circle.getM()) * rms,  1.0e-10);
      assertEquals(69.96016176931406, circle.getRadius(), 1.0e-10);
View Full Code Here

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

      double  r = circle.getRadius();
      for (double d= 0; d < 2 * Math.PI; d += 0.01) {
          circle.addPoint(cx + r * Math.cos(d), cy + r * Math.sin(d));
      }
      estimator = new LevenbergMarquardtEstimator();
      estimator.estimate(circle);
      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);
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.