Examples of ExponentialDistribution


Examples of gov.sandia.cognition.statistics.distribution.ExponentialDistribution

      final MultivariateGaussian augResponseDist = particle.getAugmentedResponseDistribution();

      final MultivariateGaussian updatedBetaMean = particle.getPriorBeta().clone();

      final List<Double> lambdaSamples =
          new ExponentialDistribution(2).sample(random, updatedBetaMean.getInputDimensionality());
      final Matrix lambdaSamplesMatrix =
          MatrixFactory.getDenseDefault().createDiagonal(
              VectorFactory.getDenseDefault().copyValues(lambdaSamples));
     
      /*
 
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

     * sampling from the exponential and normal distributions.
     * Communications of the ACM, 15, 873-882.
     * </p>
     */
    public double nextExponential(double mean) throws NotStrictlyPositiveException {
        return new ExponentialDistribution(getRandomGenerator(), mean,
                ExponentialDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample();
    }
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

        }
        double[] quartiles;
        long[] counts;

        // Mean 1
        quartiles = TestUtils.getDistributionQuartiles(new ExponentialDistribution(1));
        counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextExponential(1);
            TestUtils.updateCounts(value, counts, quartiles);
        }
        TestUtils.assertChiSquareAccept(expected, counts, 0.001);

        // Mean 5
        quartiles = TestUtils.getDistributionQuartiles(new ExponentialDistribution(5));
        counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextExponential(5);
            TestUtils.updateCounts(value, counts, quartiles);
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

     * sampling from the exponential and normal distributions.
     * Communications of the ACM, 15, 873-882.
     * </p>
     */
    public double nextExponential(double mean) throws NotStrictlyPositiveException {
        return new ExponentialDistribution(getRandomGenerator(), mean,
                ExponentialDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample();
    }
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

        }
        double[] quartiles;
        long[] counts;

        // Mean 1
        quartiles = TestUtils.getDistributionQuartiles(new ExponentialDistribution(1));
        counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextExponential(1);
            TestUtils.updateCounts(value, counts, quartiles);
        }
        TestUtils.assertChiSquareAccept(expected, counts, 0.001);

        // Mean 5
        quartiles = TestUtils.getDistributionQuartiles(new ExponentialDistribution(5));
        counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextExponential(5);
            TestUtils.updateCounts(value, counts, quartiles);
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

            c.gridy++;
            c.gridx = 0;
            comp = createComponent("Exponential", 0, 5,
                                   new String[] { "λ=0.5", "λ=1", "λ=1.5", "λ=2.5" },
                                   new ExponentialDistribution(0.5),
                                   new ExponentialDistribution(1),
                                   new ExponentialDistribution(1.5),
                                   new ExponentialDistribution(2.5));                              
            container.add(comp, c);

            c.gridx++;
            comp = createComponent("Fisher-Snedecor", 0, 5,
                                   new String[] { "d1=1,d2=1", "d1=2,d2=1", "d1=5,d2=2", "d1=100,d2=1", "d1=100,d2=100" },
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

            try
            {
                String[] bounds = params.get(0).split("\\.\\.+");
                final long min = Long.parseLong(bounds[0]);
                final long max = Long.parseLong(bounds[1]);
                ExponentialDistribution findBounds = new ExponentialDistribution(1d);
                // max probability should be roughly equal to accuracy of (max-min) to ensure all values are visitable,
                // over entire range, but this results in overly skewed distribution, so take sqrt
                final double mean = (max - min) / findBounds.inverseCumulativeProbability(1d - Math.sqrt(1d/(max-min)));
                return new ExpFactory(min, max, mean);
            } catch (Exception _)
            {
                throw new IllegalArgumentException("Invalid parameter list for uniform distribution: " + params);
            }
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

        }

        @Override
        public Distribution get()
        {
            return new DistributionOffsetApache(new ExponentialDistribution(mean), min, max);
        }
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

        }
        double[] quartiles;
        long[] counts;

        // Mean 1
        quartiles = TestUtils.getDistributionQuartiles(new ExponentialDistribution(1));
        counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextExponential(1);
            TestUtils.updateCounts(value, counts, quartiles);
        }
        TestUtils.assertChiSquareAccept(expected, counts, 0.001);

        // Mean 5
        quartiles = TestUtils.getDistributionQuartiles(new ExponentialDistribution(5));
        counts = new long[4];
        randomData.reSeed(1000);
        for (int i = 0; i < 1000; i++) {
            double value = randomData.nextExponential(5);
            TestUtils.updateCounts(value, counts, quartiles);
View Full Code Here

Examples of org.apache.commons.math3.distribution.ExponentialDistribution

     * sampling from the exponential and normal distributions.
     * Communications of the ACM, 15, 873-882.
     * </p>
     */
    public double nextExponential(double mean) throws NotStrictlyPositiveException {
        return new ExponentialDistribution(getRandomGenerator(), mean,
                ExponentialDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample();
    }
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.