Package org.encog.neural.data.basic

Examples of org.encog.neural.data.basic.BasicNeuralData


                    + output.getData(5) + ", " + "\n");
        }
    }

    public double [] query(double [] data) {
        BasicNeuralData neuralData = new BasicNeuralData(data);
        final NeuralData output = network.compute(neuralData);
        return output.getData();
    }
View Full Code Here


    for(int i=0;i<training.idealCount;i++)
    {
      idealData[i] = Double.parseDouble(args[index++].toString());
    }
   
    training.data.add(new BasicNeuralDataPair(new BasicNeuralData(inputData),new BasicNeuralData(idealData)));
   
  }
View Full Code Here

   *            How much of the data is input.
   */
  public void write(final double[] data, final int inputCount) {

    if (this.idealCount == 0) {
      final BasicNeuralData inputData = new BasicNeuralData(data);
      this.dataset.add(inputData);
    } else {
      final BasicNeuralData inputData = new BasicNeuralData(
          this.inputCount);
      final BasicNeuralData idealData = new BasicNeuralData(
          this.idealCount);

      int index = 0;
      for (int i = 0; i < this.inputCount; i++) {
        inputData.setData(i, data[index++]);
      }

      for (int i = 0; i < this.idealCount; i++) {
        idealData.setData(i, data[index++]);
      }

      this.dataset.add(inputData, idealData);
    }

View Full Code Here

   * @param index
   *            The index to generate neural data for.
   * @return The input neural data generated.
   */
  public BasicNeuralData generateInputNeuralData(final int index) {
    final BasicNeuralData result = new BasicNeuralData(
        this.inputNeuronCount);
    int resultIndex = 0;

    for (int i = 0; i < this.inputWindowSize; i++) {
      int descriptionIndex = 0;

      for (final TemporalDataDescription desc : this.descriptions) {
        if (desc.isInput()) {
          result.setData(resultIndex++, formatData(desc, index + i));
        }
        descriptionIndex++;
      }
    }
    return result;
View Full Code Here

          + "beyond the end of provided data.";

      throw new TemporalError(str);
    }

    final BasicNeuralData result = new BasicNeuralData(
        this.outputNeuronCount);
    int resultIndex = 0;

    for (int i = 0; i < this.predictWindowSize; i++) {
      int descriptionIndex = 0;

      for (final TemporalDataDescription desc : this.descriptions) {
        if (desc.isPredict()) {
          result.setData(resultIndex++, formatData(desc, index + i));
        }
        descriptionIndex++;
      }

    }
View Full Code Here

TOP

Related Classes of org.encog.neural.data.basic.BasicNeuralData

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.