Package org.apache.commons.math3.stat.interval

Examples of org.apache.commons.math3.stat.interval.ConfidenceInterval


        return new NormalApproximationInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.07793197, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1220680, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here


        return new ClopperPearsonInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.07873857, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1248658, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

        return new AgrestiCoullInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.07993521, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1243704, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

        return new WilsonScoreInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.08003919, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1242664, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

        return new NormalApproximationInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.07793197, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1220680, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

        return new ClopperPearsonInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.07873857, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1248658, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

        return new AgrestiCoullInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.07993521, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1243704, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

        return new WilsonScoreInterval();
    }
   
    @Test
    public void testStandardInterval() {
        ConfidenceInterval confidenceInterval = createStandardTestInterval();
        Assert.assertEquals(0.08003919, confidenceInterval.getLowerBound(), 1E-5);
        Assert.assertEquals(0.1242664, confidenceInterval.getUpperBound(), 1E-5);
    }
View Full Code Here

     * @param checker Convergence checker.
     */
    protected BaseOptimizer(ConvergenceChecker<PAIR> checker) {
        this.checker = checker;

        evaluations = new Incrementor(0, new MaxEvalCallback());
        iterations = new Incrementor(0, new MaxIterCallback());
    }
View Full Code Here

        DimensionMismatchException, NonSelfAdjointOperatorException,
        NonPositiveDefiniteOperatorException, IllConditionedOperatorException,
        MaxCountExceededException {
        checkParameters(a, m, b, x);

        final IterationManager manager = getIterationManager();
        /* Initialization counts as an iteration. */
        manager.resetIterationCount();
        manager.incrementIterationCount();

        final State state;
        state = new State(a, m, b, goodb, shift, delta, check);
        state.init();
        state.refineSolution(x);
        IterativeLinearSolverEvent event;
        event = new DefaultIterativeLinearSolverEvent(this,
                                                      manager.getIterations(),
                                                      x,
                                                      b,
                                                      state.getNormOfResidual());
        if (state.bEqualsNullVector()) {
            /* If b = 0 exactly, stop with x = 0. */
            manager.fireTerminationEvent(event);
            return x;
        }
        /* Cause termination if beta is essentially zero. */
        final boolean earlyStop;
        earlyStop = state.betaEqualsZero() || state.hasConverged();
        manager.fireInitializationEvent(event);
        if (!earlyStop) {
            do {
                manager.incrementIterationCount();
                event = new DefaultIterativeLinearSolverEvent(this,
                                                              manager.getIterations(),
                                                              x,
                                                              b,
                                                              state.getNormOfResidual());
                manager.fireIterationStartedEvent(event);
                state.update();
                state.refineSolution(x);
                event = new DefaultIterativeLinearSolverEvent(this,
                                                              manager.getIterations(),
                                                              x,
                                                              b,
                                                              state.getNormOfResidual());
                manager.fireIterationPerformedEvent(event);
            } while (!state.hasConverged());
        }
        event = new DefaultIterativeLinearSolverEvent(this,
                                                      manager.getIterations(),
                                                      x,
                                                      b,
                                                      state.getNormOfResidual());
        manager.fireTerminationEvent(event);
        return x;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.math3.stat.interval.ConfidenceInterval

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.