Examples of BasicMLDataPair


Examples of org.encog.ml.data.basic.BasicMLDataPair

  public void addRow(final int row) {
    final int idealSize = this.data.getIdealSize();
    final int inputSize = this.data.getInputSize();
    final MLData idealData = new BasicMLData(idealSize);
    final MLData inputData = new BasicMLData(inputSize);
    final MLDataPair pair = new BasicMLDataPair(inputData,
        idealData);
    if (row == -1) {
      this.data.getData().add(pair);
    } else {
      this.data.getData().add(row, pair);
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

      // handle predict window
      for (int j = 0; j < this.predictWindow; j++) {
        idealData.setData(j, data[index++]);
      }

      final MLDataPair pair = new BasicMLDataPair(inputData,
          idealData);
      result.add(pair);
    }

    return result;
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

          double d = csv.getDouble(index++);
          ideal.setData(i, d);
        }
      }

      MLDataPair pair = new BasicMLDataPair(input, ideal);
      result.add(pair);
    }

    return result;
  }
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

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

      final BasicMLDataPair pair = new BasicMLDataPair(inputData,
          idealData);
      result.add(pair);

    }
    return result;
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

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

      final BasicMLDataPair pair = new BasicMLDataPair(inputData,
          idealData);
      training.add(pair);

    }
  }
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

      if (this.codec.getIdealSize() > 0) {
        b = new BasicMLData(ideal);
      }

      final MLDataPair pair = new BasicMLDataPair(a, b);
      pair.setSignificance(significance[0]);
      this.result.add(pair);

      currentRecord++;
      lastUpdate++;
      if (lastUpdate >= 10000) {
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

          for (int x = 0; x < ds.getWidth(); x++) {
            item.setData(idx++, ds.getData(x, y) ? .5 : -.5);
          }
        }

        trainingSet.add(new BasicMLDataPair(item, null));
      }

      this.net = new SOM(inputNeuron,outputNeuron);
      this.net.reset();
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

    final BasicMLData input = new BasicMLData(
        this.indexableTraining.getInputSize());
    final BasicMLData ideal = new BasicMLData(
        this.indexableTraining.getIdealSize());
    this.pair = new BasicMLDataPair(input, ideal);

    // setup coefficient arrays for finite difference method
    // create differential coefficient arrays
    this.differentialCoefficients = CreateCoefficients(LevenbergMarquardtTraining.NUM_POINTS);
    this.derivativeStepSize = new double[this.parametersLength];
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

          final MLData idealData = new BasicMLData(inputCount);
          for (int i = 0; i < outputCount; i++) {
            idealData.setData(i,
                CSVFormat.EG_FORMAT.parse(cols.get(index++)));
          }
          final MLDataPair pair = new BasicMLDataPair(inputData,
              idealData);
          samples.add(pair);
        }
      }
    }
View Full Code Here

Examples of org.encog.ml.data.basic.BasicMLDataPair

      MLDataSet result = new BasicMLDataSet();
      for(int i=0;i<count;i++) {
        for(int j=0;j<4;j++) {
          MLData inputData = new BasicMLData(XOR_INPUT[j]);
          MLData idealData = new BasicMLData(XOR_IDEAL[j]);
          MLDataPair pair = new BasicMLDataPair(inputData,idealData);
          inputData.setData(0, inputData.getData(0)+RangeRandomizer.randomize(-0.1, 0.1));
          inputData.setData(1, inputData.getData(1)+RangeRandomizer.randomize(-0.1, 0.1));
          result.add(pair);
        }
      }
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.