Examples of Weight


Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        PointVectorValuePair optimum1 =
            optimizer.optimize(new MaxEval(100),
                               problem1.getModelFunction(),
                               problem1.getModelFunctionJacobian(),
                               problem1.getTarget(),
                               new Weight(new double[] { 1, 1, 1, 1 }),
                               new InitialGuess(new double[] { 0, 1, 2, 3 }));
        Assert.assertEquals(0, optimizer.getRMS(), 1e-10);
        Assert.assertEquals(1, optimum1.getPoint()[0], 1e-10);
        Assert.assertEquals(1, optimum1.getPoint()[1], 1e-10);
        Assert.assertEquals(1, optimum1.getPoint()[2], 1e-10);
        Assert.assertEquals(1, optimum1.getPoint()[3], 1e-10);

        LinearProblem problem2 = new LinearProblem(new double[][] {
                { 10.00, 7.00, 8.10, 7.20 },
                7.08, 5.04, 6.00, 5.00 },
                8.00, 5.98, 9.89, 9.00 },
                6.99, 4.99, 9.00, 9.98 }
        }, new double[] { 32, 23, 33, 31 });
        PointVectorValuePair optimum2 =
            optimizer.optimize(new MaxEval(100),
                               problem2.getModelFunction(),
                               problem2.getModelFunctionJacobian(),
                               problem2.getTarget(),
                               new Weight(new double[] { 1, 1, 1, 1 }),
                               new InitialGuess(new double[] { 0, 1, 2, 3 }));
        Assert.assertEquals(0, optimizer.getRMS(), 1e-10);
        Assert.assertEquals(-81, optimum2.getPoint()[0], 1e-8);
        Assert.assertEquals(137, optimum2.getPoint()[1], 1e-8);
        Assert.assertEquals(-34, optimum2.getPoint()[2], 1e-8);

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        AbstractLeastSquaresOptimizer optimizer = createOptimizer();
        optimizer.optimize(new MaxEval(100),
                           problem.getModelFunction(),
                           problem.getModelFunctionJacobian(),
                           problem.getTarget(),
                           new Weight(new double[] { 1, 1, 1 }),
                           new InitialGuess(new double[] { 7, 6, 5, 4 }));
        Assert.assertEquals(0, optimizer.getRMS(), 1e-10);
    }

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

            final PointVectorValuePair optimum
                = 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++) {

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        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);
    }

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

    @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 }));
    }

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        PointVectorValuePair optimum
            = optimizer.optimize(new MaxEval(100),
                                 problem.getModelFunction(),
                                 problem.getModelFunctionJacobian(),
                                 problem.getTarget(),
                                 new Weight(new double[] { 1, 1, 1 }),
                                 new InitialGuess(new double[] { 0, 0, 0 }));
        Assert.assertTrue(FastMath.sqrt(optimizer.getTargetSize()) * optimizer.getRMS() > 0.6);

        optimizer.computeCovariances(optimum.getPoint(), 1.5e-14);
    }

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

                                                  Precision.SAFE_MIN);
            optimizer.optimize(new MaxEval(maxCostEval),
                               problem,
                               problemJacobian,
                               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 }));
            Assert.assertTrue(!shouldFail);
        } catch (DimensionMismatchException ee) {
            Assert.assertTrue(shouldFail);
        } catch (TooManyEvaluationsException ee) {

Examples of org.apache.commons.math3.optim.nonlinear.vector.Weight

        final PointVectorValuePair optimum
            = optimizer.optimize(new MaxEval(100),
                                 problem.getModelFunction(),
                                 problem.getModelFunctionJacobian(),
                                 new Target(dataPoints[1]),
                                 new Weight(weights),
                                 new InitialGuess(new double[] { 10, 900, 80, 27, 225 }));

        final double[] solution = optimum.getPoint();
        final double[] expectedSolution = { 10.4, 958.3, 131.4, 33.9, 205.0 };

Examples of org.apache.commons.math3.optimization.Weight

                                         final double[] target, final double[] weights,
                                         final double[] startPoint) {
        return optimizeInternal(maxEval,
                                FunctionUtils.toMultivariateDifferentiableVectorFunction(f),
                                new Target(target),
                                new Weight(weights),
                                new InitialGuess(startPoint));
    }

Examples of org.apache.commons.math3.optimization.Weight

                                         final MultivariateDifferentiableVectorFunction f,
                                         final double[] target, final double[] weights,
                                         final double[] startPoint) {
        return optimizeInternal(maxEval, f,
                                new Target(target),
                                new Weight(weights),
                                new InitialGuess(startPoint));
    }
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.