Package org.encog.persist

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


  @Override
  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final NEATPopulation pop = (NEATPopulation) obj;
    out.addSection("NEAT-POPULATION");
    out.addSubSection("CONFIG");
    out.writeProperty(PersistConst.ACTIVATION_CYCLES,
        pop.getActivationCycles());

    if (pop.isHyperNEAT()) {
      out.writeProperty(NEATPopulation.PROPERTY_NEAT_ACTIVATION,
View Full Code Here


        pop.getActivationCycles());
    out.writeProperty(NEATPopulation.PROPERTY_POPULATION_SIZE,
        pop.getPopulationSize());
    out.writeProperty(NEATPopulation.PROPERTY_SURVIVAL_RATE,
        pop.getSurvivalRate());
    out.addSubSection("INNOVATIONS");
    if (pop.getInnovations() != null) {
      for (final String key : pop.getInnovations().getInnovations()
          .keySet()) {
        final NEATInnovation innovation = pop.getInnovations()
            .getInnovations().get(key);
View Full Code Here

        out.addColumn(innovation.getNeuronID());
        out.writeLine();
      }
    }

    out.addSubSection("SPECIES");

    // make sure the best species goes first
    final Species bestSpecies = pop.determineBestSpecies();
    if (bestSpecies != null) {
      saveSpecies(out, bestSpecies);
View Full Code Here

  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final RBFNetwork net = (RBFNetwork) obj;
    final FlatNetworkRBF flat = (FlatNetworkRBF) net.getFlat();
    out.addSection("RBF-NETWORK");
    out.addSubSection("PARAMS");
    out.addProperties(net.getProperties());
    out.addSubSection("NETWORK");
    out.writeProperty(BasicNetwork.TAG_BEGIN_TRAINING,
        flat.getBeginTraining());
    out.writeProperty(BasicNetwork.TAG_CONNECTION_LIMIT,
View Full Code Here

    final RBFNetwork net = (RBFNetwork) obj;
    final FlatNetworkRBF flat = (FlatNetworkRBF) net.getFlat();
    out.addSection("RBF-NETWORK");
    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());
    out.writeProperty(BasicNetwork.TAG_CONTEXT_TARGET_OFFSET,
View Full Code Here

  @Override
  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final TrainingContinuation cont = (TrainingContinuation) obj;
    out.addSection("CONT");
    out.addSubSection("PARAMS");
    out.writeProperty("type", cont.getTrainingType());
    for (final String key : cont.getContents().keySet()) {
      final double[] list = (double[]) cont.get(key);
      out.writeProperty(key, list);
    }
View Full Code Here

  public final void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final HiddenMarkovModel net = (HiddenMarkovModel) obj;

    out.addSection("HMM");
    out.addSubSection("PARAMS");
    out.addProperties(net.getProperties());
    out.addSubSection("CONFIG");

    out.writeProperty(HiddenMarkovModel.TAG_STATES,net.getStateCount());
    if( net.getItems()!=null ) {
View Full Code Here

    final HiddenMarkovModel net = (HiddenMarkovModel) obj;

    out.addSection("HMM");
    out.addSubSection("PARAMS");
    out.addProperties(net.getProperties());
    out.addSubSection("CONFIG");

    out.writeProperty(HiddenMarkovModel.TAG_STATES,net.getStateCount());
    if( net.getItems()!=null ) {
      out.writeProperty(HiddenMarkovModel.TAG_ITEMS,net.getItems());
    }
View Full Code Here

    }
    out.writeProperty(HiddenMarkovModel.TAG_PI,net.getPi());
    out.writeProperty(HiddenMarkovModel.TAG_TRANSITION,new Matrix(net.getTransitionProbability()));
   
    for( int i=0; i<net.getStateCount();i++) {
      out.addSubSection("DISTRIBUTION-"+i)
      StateDistribution sd = net.getStateDistribution(i);
      out.writeProperty(HiddenMarkovModel.TAG_DIST_TYPE, sd.getClass().getSimpleName());
     
      if( sd instanceof ContinousDistribution ) {
        ContinousDistribution cDist = (ContinousDistribution)sd;
View Full Code Here

  @Override
  public void save(final OutputStream os, final Object obj) {
    final EncogWriteHelper out = new EncogWriteHelper(os);
    final SVM svm2 = (SVM) obj;
    out.addSection("SVM");
    out.addSubSection("PARAMS");
    out.addProperties(svm2.getProperties());
    out.addSubSection("SVM-PARAM");
    out.writeProperty(PersistConst.INPUT_COUNT, svm2.getInputCount());
    out.writeProperty(PersistSVM.PARAM_C, svm2.getParams().C);
    out.writeProperty(PersistSVM.PARAM_CACHE_SIZE,
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.