Examples of nextGaussian()


Examples of com.heatonresearch.aifh.randomize.GenerateRandom.nextGaussian()

        final double[][] actual = new double[rows][cols];

        for (int row = 0; row < rows; row++) {
            for (int col = 0; col < cols; col++) {
                ideal[row][col] = rnd.nextDouble(low, high);
                actual[row][col] = ideal[row][col] + (rnd.nextGaussian() * distort);
            }
        }

        final DataHolder result = new DataHolder();
        result.setActual(actual);
View Full Code Here

Examples of com.heatonresearch.aifh.randomize.MersenneTwisterGenerateRandom.nextGaussian()

        final double[][] actual = new double[rows][cols];

        for (int row = 0; row < rows; row++) {
            for (int col = 0; col < cols; col++) {
                ideal[row][col] = rnd.nextDouble(low, high);
                actual[row][col] = ideal[row][col] + (rnd.nextGaussian() * distort);
            }
        }

        final DataHolder result = new DataHolder();
        result.setActual(actual);
View Full Code Here

Examples of com.orientechnologies.common.util.MersenneTwisterFast.nextGaussian()

    Set<Integer> keys = new HashSet<Integer>();
    MersenneTwisterFast random = new MersenneTwisterFast();
    keys.clear();

    while (keys.size() < KEYS_COUNT) {
      int key = (int) (random.nextGaussian() * Integer.MAX_VALUE / 2 + Integer.MAX_VALUE);

      localHashTable.put(key, key + "");
      keys.add(key);
      Assert.assertEquals(localHashTable.get(key), "" + key);
    }
View Full Code Here

Examples of java.util.Random.nextGaussian()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(3333);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeDouble(rand.nextGaussian());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

Examples of java.util.Random.nextGaussian()

        FastMultiByteArrayOutputStream out = new FastMultiByteArrayOutputStream(4096);
        DataOutputStream data = new DataOutputStream(out);
        Random rand = new Random(3333);
        for(int times = 0; times < 3; times++) {
            for(int i = 0; i < 10000; i++) {
                data.writeDouble(rand.nextGaussian());
            }
            probe(out.toByteArray_clear());
        }
    }
View Full Code Here

Examples of java.util.Random.nextGaussian()

      for (int j = 0; j < 10; j++) {
        input.put(String.valueOf(i) + String.valueOf(j), String.valueOf(i));
      }
      JSONEvent e = new JSONEvent();
      e.setHeaders(input);
      e.setBody(String.valueOf(rand.nextGaussian()).getBytes(encoding));
      events.add(e);
    }
    Gson gson = new Gson();
    String json = gson.toJson(events, listType);
    StringEntity input = new StringEntity(json);
View Full Code Here

Examples of java.util.Random.nextGaussian()

      for (int j = 0; j < 10; j++) {
        input.put(String.valueOf(i) + String.valueOf(j), String.valueOf(i));
      }
      JSONEvent e = new JSONEvent();
      e.setHeaders(input);
      e.setBody(String.valueOf(rand.nextGaussian()).getBytes(encoding));
      events.add(e);
    }
    Gson gson = new Gson();
    String json = gson.toJson(events, listType);
    StringEntity input = new StringEntity(json);
View Full Code Here

Examples of java.util.Random.nextGaussian()

        input.put(String.valueOf(i) + String.valueOf(j), String.valueOf(i));
      }
      input.put("MsgNum", String.valueOf(i));
      JSONEvent e = new JSONEvent();
      e.setHeaders(input);
      e.setBody(String.valueOf(rand.nextGaussian()).getBytes("UTF-8"));
      events.add(e);
    }
    Gson gson = new Gson();
    String json = gson.toJson(events, listType);
    HttpsURLConnection httpsURLConnection = null;
View Full Code Here

Examples of java.util.Random.nextGaussian()

            input.put(String.valueOf(i) + String.valueOf(j), String.valueOf(i));
        }
        input.put("MsgNum", String.valueOf(i));
        JSONEvent e = new JSONEvent();
        e.setHeaders(input);
        e.setBody(String.valueOf(rand.nextGaussian()).getBytes("UTF-8"));
        events.add(e);
    }
    Gson gson = new Gson();
    String json = gson.toJson(events, listType);
    HttpURLConnection httpURLConnection = null;
View Full Code Here

Examples of java.util.Random.nextGaussian()

    ArrayList<double[]> train = new ArrayList<double[]>();
    // 1. generate positive train samples
    for (int i = 0; i < nbPosTrain; i++) {
      double[] t = new double[dimension];
      for (int x = 0; x < dimension; x++) {
        t[x] = ran.nextGaussian();
      }

      train.add(t);
    }
    System.out.println("Samples generated");
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.