Package org.apache.commons.math.estimation

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


    p1 = null;
    p2 = null;
  }

  public void testConstruction() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }
View Full Code Here


    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }

  public void testIgnored() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    assertTrue(!m.isIgnored());
    m.setIgnored(true);
    assertTrue(m.isIgnored());
    m.setIgnored(false);
    assertTrue(!m.isIgnored());
  }
View Full Code Here

    m.setIgnored(false);
    assertTrue(!m.isIgnored());
  }

  public void testTheory() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getTheoreticalValue(), theoretical());
    checkValue(m.getResidual(), 0.1);

    double oldP1 = p1.getEstimate();
    p1.setEstimate(oldP1 + m.getResidual() / m.getPartial(p1));
    checkValue(m.getResidual(), 0.0);
    p1.setEstimate(oldP1);
    checkValue(m.getResidual(), 0.1);

    double oldP2 = p2.getEstimate();
    p2.setEstimate(oldP2 + m.getResidual() / m.getPartial(p2));
    checkValue(m.getResidual(), 0.0);
    p2.setEstimate(oldP2);
    checkValue(m.getResidual(), 0.1);

  }
View Full Code Here

    p1 = null;
    p2 = null;
  }

  public void testConstruction() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }
View Full Code Here

    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }

  public void testIgnored() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    assertTrue(!m.isIgnored());
    m.setIgnored(true);
    assertTrue(m.isIgnored());
    m.setIgnored(false);
    assertTrue(!m.isIgnored());
  }
View Full Code Here

    m.setIgnored(false);
    assertTrue(!m.isIgnored());
  }

  public void testTheory() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getTheoreticalValue(), theoretical());
    checkValue(m.getResidual(), 0.1);

    double oldP1 = p1.getEstimate();
    p1.setEstimate(oldP1 + m.getResidual() / m.getPartial(p1));
    checkValue(m.getResidual(), 0.0);
    p1.setEstimate(oldP1);
    checkValue(m.getResidual(), 0.1);

    double oldP2 = p2.getEstimate();
    p2.setEstimate(oldP2 + m.getResidual() / m.getPartial(p2));
    checkValue(m.getResidual(), 0.0);
    p2.setEstimate(oldP2);
    checkValue(m.getResidual(), 0.1);

  }
View Full Code Here

    p1 = null;
    p2 = null;
  }

  public void testConstruction() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }
View Full Code Here

    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }

  public void testIgnored() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    assertTrue(!m.isIgnored());
    m.setIgnored(true);
    assertTrue(m.isIgnored());
    m.setIgnored(false);
    assertTrue(!m.isIgnored());
  }
View Full Code Here

    m.setIgnored(false);
    assertTrue(!m.isIgnored());
  }

  public void testTheory() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getTheoreticalValue(), theoretical());
    checkValue(m.getResidual(), 0.1);

    double oldP1 = p1.getEstimate();
    p1.setEstimate(oldP1 + m.getResidual() / m.getPartial(p1));
    checkValue(m.getResidual(), 0.0);
    p1.setEstimate(oldP1);
    checkValue(m.getResidual(), 0.1);

    double oldP2 = p2.getEstimate();
    p2.setEstimate(oldP2 + m.getResidual() / m.getPartial(p2));
    checkValue(m.getResidual(), 0.0);
    p2.setEstimate(oldP2);
    checkValue(m.getResidual(), 0.1);

  }
View Full Code Here

    p1 = null;
    p2 = null;
  }

  public void testConstruction() {
    WeightedMeasurement m = new MyMeasurement(3.0, theoretical() + 0.1, this);
    checkValue(m.getWeight(), 3.0);
    checkValue(m.getMeasuredValue(), theoretical() + 0.1);
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.estimation.WeightedMeasurement

Copyright © 2018 www.massapicom. 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.