Package org.apache.commons.math3.optim

Examples of org.apache.commons.math3.optim.SimpleVectorValueChecker


        circle.addPoint(110.0, -20.0);
        circle.addPoint( 35.015.0);
        circle.addPoint( 45.097.0);

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1e-30, 1e-30));

        optimizer.optimize(new MaxEval(100),
                           circle.getModelFunction(),
                           circle.getModelFunctionJacobian(),
                           new Target(new double[] { 0, 0, 0, 0, 0 }),
View Full Code Here


        circle.addPoint(110.0, -20.0);
        circle.addPoint( 35.015.0);
        circle.addPoint( 45.097.0);

        LeastSquaresProblem lsp = builder(circle)
                .checkerPair(new SimpleVectorValueChecker(1e-30, 1e-30))
                .maxIterations(Integer.MAX_VALUE)
                .start(new double[]{98.680, 47.345})
                .build();

        optimizer.optimize(lsp);
View Full Code Here

        circle.addPoint(110.0, -20.0);
        circle.addPoint( 35.015.0);
        circle.addPoint( 45.097.0);

        LeastSquaresProblem lsp = builder(circle)
                .checkerPair(new SimpleVectorValueChecker(1e-30, 1e-30))
                .maxIterations(Integer.MAX_VALUE)
                .start(new double[]{98.680, 47.345})
                .build();

        optimizer.optimize(lsp);
View Full Code Here

        circle.addPoint(110.0, -20.0);
        circle.addPoint( 35.015.0);
        circle.addPoint( 45.097.0);

        LeastSquaresProblem lsp = builder(circle)
                .checkerPair(new SimpleVectorValueChecker(1e-30, 1e-30))
                .maxIterations(Integer.MAX_VALUE)
                .start(new double[]{98.680, 47.345})
                .build();

        optimizer.optimize(lsp);
View Full Code Here

        }
        this.xDegree = xDegree;
        this.yDegree = yDegree;

        final double safeFactor = 1e2;
        final SimpleVectorValueChecker checker
            = new SimpleVectorValueChecker(safeFactor * Precision.EPSILON,
                                           safeFactor * Precision.SAFE_MIN);
        xFitter = new PolynomialFitter(new GaussNewtonOptimizer(false, checker));
        yFitter = new PolynomialFitter(new GaussNewtonOptimizer(false, checker));
    }
View Full Code Here

public class GaussNewtonOptimizerTest
    extends AbstractLeastSquaresOptimizerAbstractTest {

    @Override
    public AbstractLeastSquaresOptimizer createOptimizer() {
        return new GaussNewtonOptimizer(new SimpleVectorValueChecker(1.0e-6, 1.0e-6));
    }
View Full Code Here

        circle.addPoint(110.0, -20.0);
        circle.addPoint( 35.015.0);
        circle.addPoint( 45.097.0);

        GaussNewtonOptimizer optimizer
            = new GaussNewtonOptimizer(new SimpleVectorValueChecker(1e-30, 1e-30));

        optimizer.optimize(new MaxEval(100),
                           circle.getModelFunction(),
                           circle.getModelFunctionJacobian(),
                           new Target(new double[] { 0, 0, 0, 0, 0 }),
View Full Code Here

    @Test(expected=NullPointerException.class)
    public void testGetOptimaBeforeOptimize() {

        JacobianMultivariateVectorOptimizer underlyingOptimizer
            = new GaussNewtonOptimizer(true, new SimpleVectorValueChecker(1e-6, 1e-6));
        JDKRandomGenerator g = new JDKRandomGenerator();
        g.setSeed(16069223052l);
        RandomVectorGenerator generator
            = new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
        MultiStartMultivariateVectorOptimizer optimizer
View Full Code Here

    @Test
    public void testTrivial() {
        LinearProblem problem
            = new LinearProblem(new double[][] { { 2 } }, new double[] { 3 });
        JacobianMultivariateVectorOptimizer underlyingOptimizer
            = new GaussNewtonOptimizer(true, new SimpleVectorValueChecker(1e-6, 1e-6));
        JDKRandomGenerator g = new JDKRandomGenerator();
        g.setSeed(16069223052l);
        RandomVectorGenerator generator
            = new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
        MultiStartMultivariateVectorOptimizer optimizer
View Full Code Here

    @Test
    public void testIssue914() {
        LinearProblem problem = new LinearProblem(new double[][] { { 2 } }, new double[] { 3 });
        JacobianMultivariateVectorOptimizer underlyingOptimizer =
                new GaussNewtonOptimizer(true, new SimpleVectorValueChecker(1e-6, 1e-6)) {
            public PointVectorValuePair optimize(OptimizationData... optData) {
                // filter out simple bounds, as they are not supported
                // by the underlying optimizer, and we don't really care for this test
                OptimizationData[] filtered = optData.clone();
                for (int i = 0; i < filtered.length; ++i) {
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.optim.SimpleVectorValueChecker

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.