Examples of sample()

@return a random value. @since 2.2
  • org.apache.commons.math3.distribution.RealDistribution.sample()
    Generate a random value sampled from this distribution. @return a random value.
  • org.apache.commons.math3.distribution.UniformIntegerDistribution.sample()
    {@inheritDoc}
  • org.apache.commons.math3.distribution.UniformRealDistribution.sample()
    {@inheritDoc}
  • org.apache.commons.math3.distribution.WeibullDistribution.sample()
    esus.ox.ac.uk/~clifford/a5/chap1/node5.html"> Inversion Method to generate exponentially distributed random values from uniform deviates.

    @return a random value. @since 2.2
  • org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample()
  • org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample()
    Do a sampling and return its results. @param e Entry to be sampled @return results of the sampling
  • org.apache.jmeter.samplers.Sampler.sample()
    Obtains statistics about the given Entry, and packages the information into a SampleResult. @param e !ToDo (Parameter description) @return !ToDo (Return description)
  • org.apache.mahout.clustering.dirichlet.models.NormalModel.sample()
    TODO: Return a proper sample from the posterior. For now, return an instance with the same parameters @return an NormalModel
  • org.apache.mahout.clustering.lda.LDASampler.sample()
    @param topicDistribution vector of p(topicId) for all topicId < model.numTopics() @param numSamples the number of times to sample (with replacement) from the model @return array of length numSamples, with each entry being a sample from the model. Theremay be repeats
  • org.apache.mahout.knn.LumpyData.sample()
  • org.apache.mahout.math.random.ChineseRestaurant.sample()
  • org.apache.mahout.math.random.MultiNormal.sample()
  • org.apache.mahout.math.stats.Sampler.sample()
  • org.apache.openejb.api.Monitor.sample()
  • plm.hmm.DlmHiddenMarkovModel.sample()
    Sample a trajectory up to time T. Note: this method will add the filter's current input to the initial (and all other) states, so if you set the model input, the offset/input will be added twice to the initial state. @param random @param numSamples @return
  • prefuse.data.parser.TypeInferencer.sample()
    Sample the given text string for the given data column index. @param column the data column index of the sample @param value the text string sample
  • twitter4j.TwitterStream.sample()
    tter.com/Streaming-API-Documentation#sample">Twitter API Wiki / Streaming API Documentation - sample @since Twitter4J 2.0.10
  • vanilla.java.processingengine.testing.Histogram.sample()

  • Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

                new UniformRealDistribution( rng, xValues[0], xValues[xValues.length - 1] );

            double sumError = 0;
            for ( int i = 0; i < numberOfSamples; i++ )
            {
                currentX = distX.sample();
                expected = f.value( currentX );
                actual = interpolation.value( currentX );
                sumError += FastMath.abs( actual - expected );
                assertEquals( expected, actual, maxTolerance );
            }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            RandomDataGenerator random = new RandomDataGenerator();

            // Generate 10 distinct random values
            for (int i = 0; i < 10; i++) {
                final RealDistribution u = new UniformRealDistribution(i + 0.5, i + 0.75);
                original[i] = u.sample();
            }

            // Generate a random permutation, making sure it is not the identity
            boolean isIdentity = true;
            do {
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            final double[] coeff = { 12.9, -3.4, 2.1 }; // 12.9 - 3.4 x + 2.1 x^2
            final PolynomialFunction f = new PolynomialFunction(coeff);

            // Collect data from a known polynomial.
            for (int i = 0; i < 100; i++) {
                final double x = rng.sample();
                fitter.addObservedPoint(x, f.value(x));
            }

            // Start fit from initial guesses that are far from the optimal values.
            final double[] best = fitter.fit(new double[] { -1e-20, 3e15, -5e25 });
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            final double[] coeff = { 12.9, -3.4, 2.1 }; // 12.9 - 3.4 x + 2.1 x^2
            final PolynomialFunction f = new PolynomialFunction(coeff);

            // Collect data from a known polynomial.
            for (int i = 0; i < 100; i++) {
                final double x = rng.sample();
                fitter.addObservedPoint(x, f.value(x));
            }

            // Start fit from initial guesses that are far from the optimal values.
            final double[] best = fitter.fit(new double[] { -1e-20, 3e15, -5e25 });
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            final PolynomialFunction f = new PolynomialFunction(coeff);

            // Collect data from a known polynomial.
            final WeightedObservedPoints obs = new WeightedObservedPoints();
            for (int i = 0; i < 100; i++) {
                final double x = rng.sample();
                obs.add(x, f.value(x));
            }

            // Start fit from initial guesses that are far from the optimal values.
            final PolynomialCurveFitter fitter
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            double sumError = 0;
            for ( int i = 0; i < numberOfSamples; i++ )
            {
                currentX = distX.sample();
                currentY = distY.sample();
                expected = f.value( currentX, currentY );
                actual = interpolation.value( currentX, currentY );
                sumError += FastMath.abs( actual - expected );
                assertEquals( expected, actual, maxTolerance );
        }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            final int numSamples = 50;
            final double tol = 6;
            for (int i = 0; i < numSamples; i++) {
                x = distX.sample();
                for (int j = 0; j < numSamples; j++) {
                    y = distY.sample();
    //                 System.out.println(x + " " + y + " " + f.value(x, y) + " " + p.value(x, y));
                    Assert.assertEquals(f.value(x, y),  p.value(x, y), tol);
                }
    //             System.out.println();
            }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.UniformRealDistribution.sample()

            final int numSamples = 50;
            final double tol = 251;
            for (int i = 0; i < numSamples; i++) {
                x = distX.sample();
                for (int j = 0; j < numSamples; j++) {
                    y = distY.sample();
    //                 System.out.println(x + " " + y + " " + f.value(x, y) + " " + p.value(x, y));
                    Assert.assertEquals(f.value(x, y),  p.value(x, y), tol);
                }
    //             System.out.println();
            }
    View Full Code Here

    Examples of org.apache.commons.math3.distribution.WeibullDistribution.sample()

                TreeSet<Result> results = new TreeSet<>();
                int count = (int) (workCount[executorIndex].sample() * multiplier);
                long targetTotalElapsed = 0;
                long start = System.nanoTime();
                long baseTime;
                if (Math.random() > 0.5) baseTime = 2 * (long) (workTime.sample() * multiplier);
                else  baseTime = 0;
                for (int j = 0 ; j < count ; j++)
                {
                    long time;
                    if (baseTime == 0) time = (long) (workTime.sample() * multiplier);
     
    View Full Code Here

    Examples of org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample()

                 * Create a Header Manager to ensure that the browsers headers
                 * are captured and sent to the server
                */
                headers = request.getHeaderManager();
                sampler.setHeaderManager(headers);
                result = sampler.sample();
                writeToClient(
                    result,
                    new BufferedOutputStream(clientSocket.getOutputStream()));
                /*
                 * We don't want to store any cookies in the generated test plan
    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.