Examples of InitialGuess


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

            = optimizer.optimize(new MaxEval(maxEval),
                                 model.getModelFunction(),
                                 model.getModelFunctionJacobian(),
                                 new Target(target),
                                 new Weight(weights),
                                 new InitialGuess(initialGuess));
        // Extract the coefficients.
        return optimum.getPointRef();
    }
View Full Code Here

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

    @Test(expected=MathUnsupportedOperationException.class)
    public void testConstraintsUnsupported() {
        createOptimizer().optimize(new MaxEval(100),
                                   new Target(new double[] { 2 }),
                                   new Weight(new double[] { 1 }),
                                   new InitialGuess(new double[] { 1, 2 }),
                                   new SimpleBounds(new double[] { -10, 0 },
                                                    new double[] { 20, 30 }));
    }
View Full Code Here

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

        optimizer.optimize(new MaxEval(100),
                           circle.getModelFunction(),
                           circle.getModelFunctionJacobian(),
                           new Target(new double[] { 0, 0, 0, 0, 0 }),
                           new Weight(new double[] { 1, 1, 1, 1, 1 }),
                           new InitialGuess(new double[] { 98.680, 47.345 }));
    }
View Full Code Here

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

                = optimizer.optimize(new MaxEval(400 * (function.getN() + 1)),
                                     function.getModelFunction(),
                                     function.getModelFunctionJacobian(),
                                     new Target(function.getTarget()),
                                     new Weight(function.getWeight()),
                                     new InitialGuess(function.getStartPoint()));
            Assert.assertFalse(exceptionExpected);
            function.checkTheoreticalMinCost(optimizer.getRMS());
            function.checkTheoreticalMinParams(optimum);
        } catch (TooManyEvaluationsException e) {
            Assert.assertTrue(exceptionExpected);
View Full Code Here

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

        optimizer.optimize(new MaxEval(1),
                           problem.getModelFunction(),
                           problem.getModelFunctionJacobian(),
                           new Target(y),
                           new Weight(w),
                           new InitialGuess(a));
        final double expected = dataset.getResidualSumOfSquares();
        final double actual = optimizer.getChiSquare();
        Assert.assertEquals(dataset.getName(), expected, actual,
                            1E-11 * expected);
    }
View Full Code Here

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

        optimizer.optimize(new MaxEval(1),
                           problem.getModelFunction(),
                           problem.getModelFunctionJacobian(),
                           new Target(y),
                           new Weight(w),
                           new InitialGuess(a));

        final double expected = FastMath
            .sqrt(dataset.getResidualSumOfSquares() /
                  dataset.getNumObservations());
        final double actual = optimizer.getRMS();
View Full Code Here

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

            = optimizer.optimize(new MaxEval(1),
                                 problem.getModelFunction(),
                                 problem.getModelFunctionJacobian(),
                                 new Target(y),
                                 new Weight(w),
                                 new InitialGuess(a));

        final double[] sig = optimizer.computeSigma(optimum.getPoint(), 1e-14);

        final int dof = y.length - a.length;
        final double[] expected = dataset.getParametersStandardDeviations();
View Full Code Here

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

                = optim.optimize(new MaxEval(Integer.MAX_VALUE),
                                 problem.getModelFunction(),
                                 problem.getModelFunctionJacobian(),
                                 new Target(problem.target()),
                                 new Weight(problem.weight()),
                                 new InitialGuess(init));
            final double[] sigma = optim.computeSigma(optimum.getPoint(), 1e-14);

            // Accumulate statistics.
            for (int i = 0; i < numParams; i++) {
                paramsFoundByDirectSolution[i].addValue(regress[i]);
View Full Code Here

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

        optim.optimize(new MaxEval(Integer.MAX_VALUE),
                       problem.getModelFunction(),
                       problem.getModelFunctionJacobian(),
                       new Target(t),
                       new Weight(w),
                       new InitialGuess(params));

        return optim.getChiSquare() / (t.length - params.length);
    }
View Full Code Here

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

    @Test
    public void testGetIterations() {
        AbstractLeastSquaresOptimizer optim = createOptimizer();
        optim.optimize(new MaxEval(100), new Target(new double[] { 1 }),
                       new Weight(new double[] { 1 }),
                       new InitialGuess(new double[] { 3 }),
                       new ModelFunction(new MultivariateVectorFunction() {
                               public double[] value(double[] point) {
                                   return new double[] {
                                       FastMath.pow(point[0], 4)
                                   };
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.