Examples of EstimatedParameter


Examples of org.apache.commons.math.estimation.EstimatedParameter

  }

  public void testMoreEstimatedParametersUnsorted() throws EstimationException {
    EstimatedParameter[] p = {
      new EstimatedParameter("p0", 2),
      new EstimatedParameter("p1", 2),
      new EstimatedParameter("p2", 2),
      new EstimatedParameter("p3", 2),
      new EstimatedParameter("p4", 2),
      new EstimatedParameter("p5", 2)
    };
    LinearProblem problem = new LinearProblem(new LinearMeasurement[] {
      new LinearMeasurement(new double[] { 1.0, 1.0 },
                           new EstimatedParameter[] { p[0], p[1] },
                           3.0),
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  }

  public void testRedundantEquations() throws EstimationException {
    EstimatedParameter[] p = {
      new EstimatedParameter("p0", 1),
      new EstimatedParameter("p1", 1)
    };
    LinearProblem problem = new LinearProblem(new LinearMeasurement[] {
      new LinearMeasurement(new double[] { 1.0, 1.0 },
                             new EstimatedParameter[] { p[0], p[1] },
                             3.0),
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  }

  public void testInconsistentEquations() throws EstimationException {
    EstimatedParameter[] p = {
      new EstimatedParameter("p0", 1),
      new EstimatedParameter("p1", 1)
    };
    LinearProblem problem = new LinearProblem(new LinearMeasurement[] {
      new LinearMeasurement(new double[] { 1.0, 1.0 },
                            new EstimatedParameter[] { p[0], p[1] },
                            3.0),
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  }

  private static class Circle implements EstimationProblem {

    public Circle(double cx, double cy) {
      this.cx = new EstimatedParameter("cx", cx);
      this.cy = new EstimatedParameter(new EstimatedParameter("cy", cy));
      points  = new ArrayList();
    }
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  public static Test suite() {
    return new TestSuite(WeightedMeasurementTest.class);
  }

  public void setUp() {
    p1 = new EstimatedParameter("p1", 1.0);
    p2 = new EstimatedParameter("p2", 2.0);
  }
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

    super(name);
  }

  public void testConstruction() {

    EstimatedParameter p1 = new EstimatedParameter("p1", 1.0);
    assertTrue(p1.getName().equals("p1"));
    checkValue(p1.getEstimate(), 1.0);
    assertTrue(! p1.isBound());

    EstimatedParameter p2 = new EstimatedParameter("p2", 2.0, true);
    assertTrue(p2.getName().equals("p2"));
    checkValue(p2.getEstimate(), 2.0);
    assertTrue(p2.isBound());

  }
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  }

  public void testBound() {

    EstimatedParameter p = new EstimatedParameter("p", 0.0);
    assertTrue(! p.isBound());
    p.setBound(true);
    assertTrue(p.isBound());
    p.setBound(false);
    assertTrue(! p.isBound());

  }
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  }

  public void testEstimate() {

    EstimatedParameter p = new EstimatedParameter("p", 0.0);
    checkValue(p.getEstimate(), 0.0);

    for (double e = 0.0; e < 10.0; e += 0.5) {
      p.setEstimate(e);
      checkValue(p.getEstimate(), e);
    }

  }
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

  public void testTrivial() throws EstimationException {
    LinearProblem problem =
      new LinearProblem(new LinearMeasurement[] {
        new LinearMeasurement(new double[] {2},
                              new EstimatedParameter[] {
                                 new EstimatedParameter("p0", 0)
                              }, 3.0)
      });
    LevenbergMarquardtEstimator estimator = new LevenbergMarquardtEstimator();
    estimator.estimate(problem);
    assertEquals(0, estimator.getRMS(problem), 1.0e-10);
View Full Code Here

Examples of org.apache.commons.math.estimation.EstimatedParameter

   }

  public void testQRColumnsPermutation() throws EstimationException {

    EstimatedParameter[] x = {
       new EstimatedParameter("p0", 0), new EstimatedParameter("p1", 0)
    };
    LinearProblem problem = new LinearProblem(new LinearMeasurement[] {
      new LinearMeasurement(new double[] { 1.0, -1.0 },
                            new EstimatedParameter[] { x[0], x[1] },
                            4.0),
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.