Package org.uncommons.maths.random

Examples of org.uncommons.maths.random.MersenneTwisterRNG.nextBoolean()


      // all weights are 1 (active)
      CDRule rule = new CDRule(0.);
      for (int condInd = 0; condInd < rule.getNbConditions(); condInd++) {
        rule.setW(condInd, 1.);
        rule.setO(condInd, rng.nextBoolean());
        rule.setV(condInd, rng.nextInt(2)); // two categories
      }

      // the condition is true if the operator is == and the values are equal
      // (value==1), or the operator is != and the values are no equal
View Full Code Here


    for (int nloop = 0; nloop < n; nloop++) {
      MersenneTwisterRNG rng = new MersenneTwisterRNG();

      byte[] seed = rng.getSeed();
      double threshold = rng.nextDouble();
      boolean training = rng.nextBoolean();

      DatasetSplit split = new DatasetSplit(seed, threshold);
      split.setTraining(training);

      JobConf conf = new JobConf();
View Full Code Here

    for (int nloop = 0; nloop < n; nloop++) {
      MersenneTwisterRNG rng = (MersenneTwisterRNG) RandomUtils.getRandom();

      byte[] seed = rng.getSeed();
      double threshold = rng.nextDouble();
      boolean training = rng.nextBoolean();

      DatasetSplit split = new DatasetSplit(seed, threshold);
      split.setTraining(training);

      JobConf conf = new JobConf();
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.