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 ca.nengo.math.impl.PoissonPDF.sample()

      private static void doTestSample(float rate) {
        PoissonPDF pdf = new PoissonPDF(rate);
        int n = 1000;
        int[] bins = new int[100];
        for (int i = 0; i < n; i++) {
          int sample = (int) Math.round(pdf.sample()[0]);
          if (sample < bins.length) bins[sample]++;
        }
        for (int i = 0; i < bins.length; i++) {
          TestUtil.assertClose(pdf.map(new float[]{i}), (float) bins[i]/ (float) n, .05f);
        }
    View Full Code Here

    Examples of cc.mallet.grmm.inference.ExactSampler.sample()

      }

      private Assignment sampleInternal (Randoms r)
      {
        ExactSampler sampler = new ExactSampler (r);
        return sampler.sample (this, 1);
      }

      public double sum ()
      {
        VariableElimination inf = new VariableElimination ();
    View Full Code Here

    Examples of cc.mallet.grmm.inference.GibbsSampler.sample()

        fg.multiplyBy (tbl1);
        fg.multiplyBy (tbl2);
        System.out.println (fg.dumpToString ());

        GibbsSampler gs = new GibbsSampler (new Randoms (324123), 10);
        gs.sample (fg, 10)// assert no exception
      }


      /**
       * @return a <code>TestSuite</code>
    View Full Code Here

    Examples of cern.colt.matrix.DoubleFactory2D.sample()

        System.out.print("\n@");

        System.out.print("x");
        double val = 0.5;
        function.A=null; function.B=null; function.C=null; function.D=null; // --> help gc before allocating new mem
        DoubleMatrix2D A = factory.sample(size,size,val,density);
        DoubleMatrix2D B = factory.sample(size,size,val,density);
        function.setParameters(A,B);
        A = null; B = null; // help gc
        float secs = BenchmarkKernel.run(minSeconds,function);
        double ops = function.operations();
    View Full Code Here

    Examples of com.higherfrequencytrading.testing.Histogram.sample()

                    final long latency = time1 - time0;
                    if (latency < 0 || latency > 100000) {
                        longDelays++;
                        System.out.println(latency);
                    }
                    hist.sample(latency);
                    totalTime += latency;
                }
            }

            t.join();
    View Full Code Here

    Examples of com.higherfrequencytrading.testing.Histogram.sample()

                    final long latency = time1 - time0;
                    if (latency < 0 || latency > 100000) {
                        longDelays++;
                        System.out.println(latency);
                    }
                    hist.sample(latency);
                    totalTime += latency;
                }
            }

            t.join();
    View Full Code Here

    Examples of com.mapr.synth.distributions.TermGenerator.sample()

        @Test
        public void generateTerms() {
            TermGenerator x = new TermGenerator(WORDS, 1, 0.8);
            final Multiset<String> counts = HashMultiset.create();
            for (int i = 0; i < 10000; i++) {
                counts.add(x.sample());
            }

            assertEquals(10000, counts.size());
            assertTrue("Should have some common words", counts.elementSet().size() < 10000);
            List<Integer> k = Lists.newArrayList(Iterables.transform(counts.elementSet(), new Function<String, Integer>() {
    View Full Code Here

    Examples of com.mapr.synth.samplers.NameSampler.sample()

            RandomUtils.useTestSeed();
            NameSampler ns = new NameSampler(NameSampler.Type.FIRST);

            List<String> expected = Lists.newArrayList("Debra", "Eric", "Kent", "Robert", "Kim", "Susan", "Michelle", "Ethan", "Clinton", "Paul", "Curt", "Courtney", "Marcella", "Michael", "Rita", "Robert", "Antonio", "Ronald", "Aurelio", "Marcus");
            for (String s : expected) {
                assertEquals("regression 1", s, ns.sample().asText());
            }

            ns.setType("LAST");
            expected = Lists.newArrayList("Rose", "Vargas", "Ramirez", "Stephens", "Zarate", "Shields", "Acklin", "Tynan", "Valencia", "Meyer", "Velasco", "Medina", "Dees", "Harris", "Patterson", "Depriest", "Debose", "Landry", "Jackson", "Dixon");
            for (String s : expected) {
    View Full Code Here

    Examples of com.mapr.synth.samplers.SchemaSampler.sample()

            int[] atmNonFraud = new int[exploitLength];
            int[] nonAtmFraud = new int[exploitLength];
            int[] nonAtmNonFraud = new int[exploitLength];

            for (int userId = 0; userId < USER_COUNT; userId++) {
                JsonNode sample = s.sample();
                merchantHistory.clear();
                boolean userHasFraud = false;

                int[] hasFraudPerUser = new int[exploitLength];
    View Full Code Here

    Examples of com.mapr.synth.samplers.StringSampler.sample()

                StringSampler s = new StringSampler();
                s.setDist(ImmutableMap.of("a", "3", "b", 5, "c", 1.0));

                Multiset<String> counts = HashMultiset.create();
                for (int i = 0; i < 1000; i++) {
                    counts.add(s.sample().asText());
                }

                assertEquals(3, counts.elementSet().size());
                check(counts, "a", 1000 * 3.0 / 9.0);
                check(counts, "b", 1000 * 5.0 / 9.0);
    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.