Package org.encog.persist

Examples of org.encog.persist.EncogWriteHelper.addSubSection()


    final EncogWriteHelper out = new EncogWriteHelper(os);
    final SOM som = (SOM) obj;
    out.addSection("SOM");
    out.addSubSection("PARAMS");
    out.addProperties(som.getProperties());
    out.addSubSection("NETWORK");
    out.writeProperty(PersistConst.WEIGHTS, som.getWeights());
    out.writeProperty(PersistConst.INPUT_COUNT, som.getInputCount());
    out.writeProperty(PersistConst.OUTPUT_COUNT, som.getOutputNeuronCount());
    out.flush();
  }
View Full Code Here


  @Override
  public final void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BasicPNN pnn = (BasicPNN) obj;
    out.addSection("PNN");
    out.addSubSection("PARAMS");
    out.addProperties(pnn.getProperties());
    out.addSubSection("NETWORK");

    out.writeProperty(PersistConst.ERROR, pnn.getError());
    out.writeProperty(PersistConst.INPUT_COUNT, pnn.getInputCount());
View Full Code Here

    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BasicPNN pnn = (BasicPNN) obj;
    out.addSection("PNN");
    out.addSubSection("PARAMS");
    out.addProperties(pnn.getProperties());
    out.addSubSection("NETWORK");

    out.writeProperty(PersistConst.ERROR, pnn.getError());
    out.writeProperty(PersistConst.INPUT_COUNT, pnn.getInputCount());
    out.writeProperty(PersistConst.KERNEL,
        PersistBasicPNN.kernelToString(pnn.getKernel()));
View Full Code Here

    out.writeProperty(PersistConst.OUTPUT_COUNT, pnn.getOutputCount());
    out.writeProperty(PersistBasicPNN.PROPERTY_outputMode,
        PersistBasicPNN.outputModeToString(pnn.getOutputMode()));
    out.writeProperty(PersistConst.SIGMA, pnn.getSigma());

    out.addSubSection("SAMPLES");
    for (final MLDataPair pair : pnn.getSamples()) {
      for (int i = 0; i < pair.getInput().size(); i++) {
        out.addColumn(pair.getInput().getData(i));
      }
      for (int i = 0; i < pair.getIdeal().size(); i++) {
View Full Code Here

      file = new File(home, EncogWorkBench.CONFIG_FILENAME);

      OutputStream os = new FileOutputStream(file);
      EncogWriteHelper out = new EncogWriteHelper(os);
      out.addSection("ENCOG");
      out.addSubSection("TRAINING");

      out.writeProperty(EncogWorkBenchConfig.PROPERTY_DEFAULT_ERROR, this.defaultError);
      out.writeProperty(EncogWorkBenchConfig.PROPERTY_THREAD_COUNT, this.threadCount);
      out.writeProperty(EncogWorkBenchConfig.PROPERTY_USE_GPU, this.useOpenCL);
      out.writeProperty(EncogWorkBenchConfig.PROPERTY_ERROR_CALC, this.errorCalculation);
View Full Code Here

  @Override
  public final void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BayesianNetwork b = (BayesianNetwork) obj;
    out.addSection("BAYES-NETWORK");
    out.addSubSection("BAYES-PARAM");
    String queryType = "";
    String queryStr = b.getClassificationStructure();

    if( b.getQuery()!=null ) {
      queryType = b.getQuery().getClass().getSimpleName();
View Full Code Here

    }
   
    out.writeProperty("queryType", queryType);
    out.writeProperty("query", queryStr);
    out.writeProperty("contents", b.getContents());
    out.addSubSection("BAYES-PROPERTIES");
    out.addProperties(b.getProperties());

    out.addSubSection("BAYES-TABLE");
    for (BayesianEvent event : b.getEvents()) {
      for (TableLine line : event.getTable().getLines()) {
View Full Code Here

    out.writeProperty("query", queryStr);
    out.writeProperty("contents", b.getContents());
    out.addSubSection("BAYES-PROPERTIES");
    out.addProperties(b.getProperties());

    out.addSubSection("BAYES-TABLE");
    for (BayesianEvent event : b.getEvents()) {
      for (TableLine line : event.getTable().getLines()) {
        if (line == null)
          continue;
        StringBuilder str = new StringBuilder();
View Full Code Here

  @Override
  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BAM bam = (BAM) obj;
    out.addSection("BAM");
    out.addSubSection("PARAMS");
    out.addProperties(bam.getProperties());
    out.addSubSection("NETWORK");

    out.writeProperty(PersistConst.PROPERTY_F1_COUNT, bam.getF1Count());
    out.writeProperty(PersistConst.PROPERTY_F2_COUNT, bam.getF2Count());
View Full Code Here

    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BAM bam = (BAM) obj;
    out.addSection("BAM");
    out.addSubSection("PARAMS");
    out.addProperties(bam.getProperties());
    out.addSubSection("NETWORK");

    out.writeProperty(PersistConst.PROPERTY_F1_COUNT, bam.getF1Count());
    out.writeProperty(PersistConst.PROPERTY_F2_COUNT, bam.getF2Count());
    out.writeProperty(PersistConst.PROPERTY_WEIGHTS_F1_F2,
        bam.getWeightsF1toF2());
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.