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.RealDistribution.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.RealDistribution.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.RealDistribution.sample()

                final double[] v = unit.nextVector();
                final double r = radius1.sample();
                // First ring is in the xy-plane, centered at (0, 0, 0).
                firstRing[i] = new Vector3D(v[0] * r,
                                            v[1] * r,
                                            widthRing1.sample());
            }

            final RealDistribution radius2
                = new UniformRealDistribution(radiusRing2 - halfWidthRing2,
                                              radiusRing2 + halfWidthRing2);
    View Full Code Here

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

            ResizableDoubleArray eDA2 = new ResizableDoubleArray(2);
            Assert.assertEquals("Initial number of elements should be 0", 0, eDA2.getNumElements());

            final IntegerDistribution randomData = new UniformIntegerDistribution(100, 1000);
            final int iterations = randomData.sample();

            for( int i = 0; i < iterations; i++) {
                eDA2.addElement( i );
            }
    View Full Code Here

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

            ResizableDoubleArray eDA3 = new ResizableDoubleArray(3, 3.0, 3.5);
            Assert.assertEquals("Initial number of elements should be 0", 0, eDA3.getNumElements() );

            final IntegerDistribution randomData = new UniformIntegerDistribution(100, 3000);
            final int iterations = randomData.sample();

            for( int i = 0; i < iterations; i++) {
                eDA3.addElement( i );
            }
    View Full Code Here

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

            // Fill weights array with random int values between 1 and 5
            int[] intWeights = new int[len];
            final IntegerDistribution weightDist = new UniformIntegerDistribution(1, 5);
            for (int i = 0; i < len; i++) {
                intWeights[i] = weightDist.sample();
                weights[i] = intWeights[i];
            }

            // Fill values array with random data from N(mu, sigma)
            // and fill valuesList with values from values array with
    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) + " " + bcf.value(x, y));
                    Assert.assertEquals(f.value(x, y),  bcf.value(x, y), tol);
                }
    //             System.out.println();
            }
    View Full Code Here

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

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

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

            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()

            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
    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.