Package org.encog.mathutil.randomize.generate

Examples of org.encog.mathutil.randomize.generate.LinearCongruentialRandom


  public ConsistentRandomizer(final double min, final double max,
      final int seed) {
    this.max = max;
    this.min = min;
    this.seed = seed;
    this.rand = new LinearCongruentialRandom(seed);
  }
View Full Code Here


  /**
   * Randomize the network.
   * @param network The network to randomize.
   */
  public void randomize(final BasicNetwork network) {
    this.rand = new LinearCongruentialRandom(seed);
    super.randomize(network);
  }
View Full Code Here

   */
  public static BasicMLDataSet generate(final long seed,
      final int count, final int inputCount,
      final int idealCount, final double min, final double max) {
   
    LinearCongruentialRandom rand =
      new LinearCongruentialRandom(seed);
   
    final BasicMLDataSet result = new BasicMLDataSet();
    for (int i = 0; i < count; i++) {
      final MLData inputData = new BasicMLData(inputCount);

      for (int j = 0; j < inputCount; j++) {
        inputData.setData(j, rand.nextDouble(min, max));
      }

      final MLData idealData = new BasicMLData(idealCount);

      for (int j = 0; j < idealCount; j++) {
        idealData.setData(j, rand.nextDouble(min, max));
      }

      final BasicMLDataPair pair = new BasicMLDataPair(inputData,
          idealData);
      result.add(pair);
View Full Code Here

  public static void generate(final MLDataSet training,
      final long seed,
      final int count,
      final double min, final double max) {
   
    LinearCongruentialRandom rand
      = new LinearCongruentialRandom(seed);
   
    int inputCount = training.getInputSize();
    int idealCount = training.getIdealSize();
   
    for (int i = 0; i < count; i++) {
      final MLData inputData = new BasicMLData(inputCount);

      for (int j = 0; j < inputCount; j++) {
        inputData.setData(j, rand.nextDouble(min, max));
      }

      final MLData idealData = new BasicMLData(idealCount);

      for (int j = 0; j < idealCount; j++) {
        idealData.setData(j, rand.nextDouble(min, max));
      }

      final BasicMLDataPair pair = new BasicMLDataPair(inputData,
          idealData);
      training.add(pair);
View Full Code Here

TOP

Related Classes of org.encog.mathutil.randomize.generate.LinearCongruentialRandom

Copyright © 2018 www.massapicom. 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.