Package org.encog.persist

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


    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");
   
    if (pnn.getSamples() != null) {
      for (final MLDataPair pair : pnn.getSamples()) {
        for (int i = 0; i < pair.getInput().size(); i++) {
          out.addColumn(pair.getInput().getData(i));
View Full Code Here


  @Override
  public void save(final OutputStream os, final Object obj) {
    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.getOutputCount());
View Full Code Here

    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.getOutputCount());
    out.flush();
  }
View Full Code Here

  @Override
  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final HopfieldNetwork hopfield = (HopfieldNetwork) obj;
    out.addSection("HOPFIELD");
    out.addSubSection("PARAMS");
    out.addProperties(hopfield.getProperties());
    out.addSubSection("NETWORK");
    out.writeProperty(PersistConst.WEIGHTS, hopfield.getWeights());
    out.writeProperty(PersistConst.OUTPUT, hopfield.getCurrentState()
        .getData());
View Full Code Here

  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BasicNetwork net = (BasicNetwork) obj;
    final FlatNetwork flat = net.getStructure().getFlat();
    out.addSection("BASIC");
    out.addSubSection("PARAMS");
    out.addProperties(net.getProperties());
    out.addSubSection("NETWORK");

    out.writeProperty(BasicNetwork.TAG_BEGIN_TRAINING,
        flat.getBeginTraining());
View Full Code Here

    final EncogWriteHelper out = new EncogWriteHelper(os);
    final HopfieldNetwork hopfield = (HopfieldNetwork) obj;
    out.addSection("HOPFIELD");
    out.addSubSection("PARAMS");
    out.addProperties(hopfield.getProperties());
    out.addSubSection("NETWORK");
    out.writeProperty(PersistConst.WEIGHTS, hopfield.getWeights());
    out.writeProperty(PersistConst.OUTPUT, hopfield.getCurrentState()
        .getData());
    out.writeProperty(PersistConst.NEURON_COUNT, hopfield.getNeuronCount());
    out.flush();
View Full Code Here

    final BasicNetwork net = (BasicNetwork) obj;
    final FlatNetwork flat = net.getStructure().getFlat();
    out.addSection("BASIC");
    out.addSubSection("PARAMS");
    out.addProperties(net.getProperties());
    out.addSubSection("NETWORK");

    out.writeProperty(BasicNetwork.TAG_BEGIN_TRAINING,
        flat.getBeginTraining());
    out.writeProperty(BasicNetwork.TAG_CONNECTION_LIMIT,
        flat.getConnectionLimit());
View Full Code Here

    out.writeProperty(PersistConst.OUTPUT_COUNT, flat.getOutputCount());
    out.writeProperty(BasicNetwork.TAG_WEIGHT_INDEX, flat.getWeightIndex());
    out.writeProperty(PersistConst.WEIGHTS, flat.getWeights());
    out.writeProperty(BasicNetwork.TAG_BIAS_ACTIVATION,
        flat.getBiasActivation());
    out.addSubSection("ACTIVATION");
    for (final ActivationFunction af : flat.getActivationFunctions()) {
      String sn = af.getClass().getSimpleName();
      // if this is an Encog class then only add the simple name, so it works with C#
      if( sn.startsWith("org.encog.") ) {
        out.addColumn(sn);
View Full Code Here

  @Override
  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BoltzmannMachine boltz = (BoltzmannMachine) obj;
    out.addSection("BOLTZMANN");
    out.addSubSection("PARAMS");
    out.addProperties(boltz.getProperties());
    out.addSubSection("NETWORK");
    out.writeProperty(PersistConst.WEIGHTS, boltz.getWeights());
    out.writeProperty(PersistConst.OUTPUT, boltz.getCurrentState()
        .getData());
View Full Code Here

    final EncogWriteHelper out = new EncogWriteHelper(os);
    final BoltzmannMachine boltz = (BoltzmannMachine) obj;
    out.addSection("BOLTZMANN");
    out.addSubSection("PARAMS");
    out.addProperties(boltz.getProperties());
    out.addSubSection("NETWORK");
    out.writeProperty(PersistConst.WEIGHTS, boltz.getWeights());
    out.writeProperty(PersistConst.OUTPUT, boltz.getCurrentState()
        .getData());
    out.writeProperty(PersistConst.NEURON_COUNT, boltz.getNeuronCount());
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.