org.apache.commons.math.optimization.general.GaussNewtonOptimizer Java Examples

The following examples show how to use org.apache.commons.math.optimization.general.GaussNewtonOptimizer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #2
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #3
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #4
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #5
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #6
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #7
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #8
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = MathUserException.class)
public void testNoOptimum() {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(100, new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) {
                throw new MathUserException();
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #9
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = MathUserException.class)
public void testNoOptimum() {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(100, new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) {
                throw new MathUserException();
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #10
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = ConvergenceException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxEvaluations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #11
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #12
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #13
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = MathUserException.class)
public void testNoOptimum() {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(100, new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) {
                throw new MathUserException();
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #14
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #15
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #16
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
@Test(expected = OptimizationException.class)
public void testNoOptimum() throws FunctionEvaluationException, OptimizationException {
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(12373523445l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setMaxIterations(100);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));
    optimizer.optimize(new DifferentiableMultivariateVectorialFunction() {
            public MultivariateMatrixFunction jacobian() {
                return null;
            }
            public double[] value(double[] point) throws FunctionEvaluationException {
                throw new FunctionEvaluationException(point[0]);
            }
        }, new double[] { 2 }, new double[] { 1 }, new double[] { 0 });
}
 
Example #17
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #18
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #19
Source File: MultiStartDifferentiableMultivariateVectorialOptimizerTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testTrivial() {
    LinearProblem problem =
        new LinearProblem(new double[][] { { 2 } }, new double[] { 3 });
    DifferentiableMultivariateVectorialOptimizer underlyingOptimizer =
        new GaussNewtonOptimizer(true);
    JDKRandomGenerator g = new JDKRandomGenerator();
    g.setSeed(16069223052l);
    RandomVectorGenerator generator =
        new UncorrelatedRandomVectorGenerator(1, new GaussianRandomGenerator(g));
    MultiStartDifferentiableMultivariateVectorialOptimizer optimizer =
        new MultiStartDifferentiableMultivariateVectorialOptimizer(underlyingOptimizer,
                                                                   10, generator);
    optimizer.setConvergenceChecker(new SimpleVectorialValueChecker(1.0e-6, 1.0e-6));

    // no optima before first optimization attempt
    try {
        optimizer.getOptima();
        Assert.fail("an exception should have been thrown");
    } catch (MathIllegalStateException ise) {
        // expected
    }
    VectorialPointValuePair optimum =
        optimizer.optimize(100, problem, problem.target, new double[] { 1 }, new double[] { 0 });
    Assert.assertEquals(1.5, optimum.getPoint()[0], 1.0e-10);
    Assert.assertEquals(3.0, optimum.getValue()[0], 1.0e-10);
    VectorialPointValuePair[] optima = optimizer.getOptima();
    Assert.assertEquals(10, optima.length);
    for (int i = 0; i < optima.length; ++i) {
        Assert.assertEquals(1.5, optima[i].getPoint()[0], 1.0e-10);
        Assert.assertEquals(3.0, optima[i].getValue()[0], 1.0e-10);
    }
    Assert.assertTrue(optimizer.getEvaluations() > 20);
    Assert.assertTrue(optimizer.getEvaluations() < 50);
    Assert.assertEquals(100, optimizer.getMaxEvaluations());
}
 
Example #20
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #21
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #22
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #23
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #24
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #25
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #26
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #27
Source File: RegressionInfo.java    From mzmine2 with GNU General Public License v2.0 5 votes vote down vote up
private PolynomialFunction getPolynomialFunction() {
  Collections.sort(data, new RTs());
  PolynomialFitter fitter = new PolynomialFitter(3, new GaussNewtonOptimizer(true));
  for (RTs rt : data) {
    fitter.addObservedPoint(1, rt.RT, rt.RT2);
  }
  try {
    return fitter.fit();

  } catch (Exception ex) {
    return null;
  }
}
 
Example #28
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}
 
Example #29
Source File: RegressionInfo.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
private PolynomialFunction getPolynomialFunction() {
  Collections.sort(data, new RTs());
  PolynomialFitter fitter = new PolynomialFitter(3, new GaussNewtonOptimizer(true));
  for (RTs rt : data) {
    fitter.addObservedPoint(1, rt.RT, rt.RT2);
  }
  try {
    return fitter.fit();

  } catch (Exception ex) {
    return null;
  }
}
 
Example #30
Source File: PolynomialFitterTest.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void testRedundantUnsolvable() {
    // Gauss-Newton should not be able to solve redundant information
    DifferentiableMultivariateVectorialOptimizer optimizer =
        new GaussNewtonOptimizer(true);
    checkUnsolvableProblem(optimizer, false);
}