Package org.encog.ml.data.basic

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


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

            pair = new BasicMLDataPair(inputData, idealData);
        }
        return pair;
    }
View Full Code Here

    BasicMLData input = new BasicMLData(
        MatrixMLDataSet.this.calculatedInputSize * calculateLagCount());
    BasicMLData ideal = new BasicMLData(
        MatrixMLDataSet.this.calculatedIdealSize * calculateLeadCount());
    MLDataPair pair = new BasicMLDataPair(input, ideal);

    MatrixMLDataSet.this.getRecord(index, pair);

    return pair;
  }
View Full Code Here

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

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

    return result;
  }
View Full Code Here

    while (csv.next() && !shouldStop()) {
      updateStatus(true);
      final double[] inputArray = AnalystNormalizeCSV.extractFields(
          analyst, this.analystHeaders, csv, outputLength, true);
      final MLData input = new BasicMLData(inputArray);
      this.data.add(new BasicMLDataPair(input));

      recordCount++;
    }
    setRecordCount(recordCount);
    this.setColumnCount(csv.getColumnCount());
View Full Code Here

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

  public void testNEATBuffered() {
    BufferedMLDataSet buffer = new BufferedMLDataSet(EGB_FILENAME);
    buffer.beginLoad(2, 1);
    for(int i=0;i<XOR.XOR_INPUT.length;i++) {
      buffer.add(new BasicMLDataPair(
          new BasicMLData(XOR.XOR_INPUT[i]),
          new BasicMLData(XOR.XOR_IDEAL[i])));
    }
    buffer.endLoad();
   
View Full Code Here

      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

  @Override
  public MLDataSet openAdditional() {
    EnsembleDataSet copy = new EnsembleDataSet(idealSize,inputSize);
    for (MLDataPair line: data) {
      BasicMLDataPair newLine = new BasicMLDataPair(line.getInput(), line.getIdeal());
      copy.add(newLine);
    }
    return copy;
  }
View Full Code Here

    return copy;
  }

  @Override
  public void add(MLData data1) {
    BasicMLDataPair mlP = new BasicMLDataPair(data1);
    data.add(mlP);
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.data.basic.BasicMLDataPair

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.