Examples of MLDataSet


Examples of org.encog.ml.data.MLDataSet

    try {
      EvaluateDialog dialog = new EvaluateDialog(EncogWorkBench
          .getInstance().getMainWindow());
      if (dialog.process()) {
        MLMethod method = dialog.getNetwork();
        MLDataSet training = dialog.getTrainingSet();

        double error = 0;

        if (method instanceof MLError) {
          error = ((MLError) method).calculateError(training);
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

  @Override
  public final void performJobUnit(final JobUnitContext context) {

    final BasicNetwork network = (BasicNetwork) context.getJobUnit();
    BufferedNeuralDataSet buffer = null;
    MLDataSet useTraining = this.training;

    if (this.training instanceof BufferedNeuralDataSet) {
      buffer = (BufferedNeuralDataSet) this.training;
      useTraining = buffer.openAdditional();
    }
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

      network.getStructure().finalizeStructure();
      network.reset();
      (new ConsistentRandomizer(0,0.5,i)).randomize(network);

      // create training data
      MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);

      // train the neural network
      final ResilientPropagation train = new ResilientPropagation(network, trainingSet);
      train.setRPROPType(RPROPType.iRPROPp);
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

 
  public void run()
  {
    normalizeSunspots(0.1,0.9);
    BasicNetwork network = createNetwork();
    MLDataSet training = generateTraining();
    train(network,training);
    predict(network);
   
  }
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

 
  public void run()
  {
    normalizeSunspots(0.1,0.9);
    SVM network = createNetwork();
    MLDataSet training = generateTraining();
    train(network,training);
    predict(network);
   
  }
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

     */
    public static MLDataSet loadCSV2Memory(String filename, int input, int ideal, boolean headers, CSVFormat format, boolean significance)
    {
        DataSetCODEC codec = new CSVDataCODEC(new File(filename), format, headers, input, ideal, significance);
        MemoryDataLoader load = new MemoryDataLoader(codec);
        MLDataSet dataset = load.external2Memory();
        return dataset;
    }
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

   * Create a dataset from the clustered data.
   * @return The dataset.
   */
  @Override
  public final MLDataSet createDataSet() {
    final MLDataSet result = new BasicMLDataSet();

    for (final MLData dataItem : this.data) {
      result.add(dataItem);
    }

    return result;
  }
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

    // Display the cluster
    int i = 1;
    for (final MLCluster cluster : kmeans.getClusters()) {
      System.out.println("*** Cluster " + (i++) + " ***");
      final MLDataSet ds = cluster.createDataSet();
      final MLDataPair pair = BasicMLDataPair.createPair(
          ds.getInputSize(), ds.getIdealSize());
      for (int j = 0; j < ds.getRecordCount(); j++) {
        ds.getRecord(j, pair);
        System.out.println(Arrays.toString(pair.getInputArray()));

      }
    }
  }
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

    network.addLayer(new BasicLayer(2));
    network.addLayer(new BasicLayer(1));
    network.getStructure().finalizeStructure();
    network.reset();

    MLDataSet trainingSet = new SQLNeuralDataSet(
        XORSQL.SQL,
        XORSQL.INPUT_SIZE,
        XORSQL.IDEAL_SIZE,
        XORSQL.SQL_DRIVER,
        XORSQL.SQL_URL,
View Full Code Here

Examples of org.encog.ml.data.MLDataSet

  }
 
  public static void evaluate() {
    int[] count = new int[TRIES];
   
    MLDataSet trainingData = generateTraining(INPUT_OUTPUT_COUNT, COMPL);
   
    for(int i=0;i<TRIES;i++) {
   
      MLMethod method = EncogUtility.simpleFeedForward(INPUT_OUTPUT_COUNT,
          HIDDEN_COUNT, 0, INPUT_OUTPUT_COUNT, false);
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.