Package org.encog.persist

Examples of org.encog.persist.EncogReadHelper


   * {@inheritDoc}
   */
  @Override
  public final Object read(final InputStream is) {
    final TrainingContinuation result = new TrainingContinuation();
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("CONT")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        for (final String key : params.keySet()) {
          if (key.equalsIgnoreCase("type")) {
View Full Code Here


   */
  @Override
  public final Object read(final InputStream is) {
    final BasicNetwork result = new BasicNetwork();
    final FlatNetwork flat = new FlatNetwork();
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("BASIC")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        result.getProperties().putAll(params);
      }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final Object read(final InputStream is) {
    Map<String, String> networkParams = null;
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;
    int inputCount = 0;
    int instarCount = 0;
    int outputCount = 0;
    int winnerCount = 0;
    Matrix m1 = null;
    Matrix m2 = null;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("CPN")
          && section.getSubSectionName().equals("PARAMS")) {
        networkParams = section.parseParams();
      }
      if (section.getSectionName().equals("CPN")
View Full Code Here

  }

  @Override
  public Object read(InputStream is) {
    NEATNetwork result = new NEATNetwork()
    EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;
    Map<Integer,NEATNeuron> neuronMap = new HashMap<Integer,NEATNeuron>();
   
    while( (section = in.readNextSection()) != null ) {
      if( section.getSectionName().equals("NEAT") && section.getSubSectionName().equals("PARAMS") ) {
        Map<String,String> params = section.parseParams();
        result.getProperties().putAll(params);
      } if( section.getSectionName().equals("NEAT") && section.getSubSectionName().equals("NETWORK") ) {
        Map<String,String> params = section.parseParams();
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final Object read(final InputStream is) {
    final HopfieldNetwork result = new HopfieldNetwork();
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("HOPFIELD")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        result.getProperties().putAll(params);
      }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final Object read(final InputStream is) {
    final BAM result = new BAM();
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("BAM")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        result.getProperties().putAll(params);
      }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final Object read(final InputStream is) {
    final BoltzmannMachine result = new BoltzmannMachine();
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("BOLTZMANN")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        result.getProperties().putAll(params);
      }
View Full Code Here

   * {@inheritDoc}
   */
  @Override
  public final Object read(final InputStream is) {
    final ART1 result = new ART1();
    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("ART1")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        result.getProperties().putAll(params);
      }
View Full Code Here

  @Override
  public final Object read(final InputStream is) {
    final RBFNetwork result = new RBFNetwork();
    final FlatNetworkRBF flat = (FlatNetworkRBF) result.getFlat();

    final EncogReadHelper in = new EncogReadHelper(is);
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("RBF-NETWORK")
          && section.getSubSectionName().equals("PARAMS")) {
        final Map<String, String> params = section.parseParams();
        result.getProperties().putAll(params);
      }
View Full Code Here

  public Object read(InputStream is) {
    NEATPopulation result = new NEATPopulation();
    NEATInnovationList innovationList = new NEATInnovationList();
    innovationList.setPopulation(result);
    result.setInnovations(innovationList);
    EncogReadHelper in = new EncogReadHelper(is);
    Map<Integer, Species> speciesMap = new HashMap<Integer, Species>();
    Map<Species, Integer> leaderMap = new HashMap<Species, Integer>();
    Map<Integer, Genome> genomeMap = new HashMap<Integer, Genome>();
    EncogFileSection section;

    while ((section = in.readNextSection()) != null) {
      if (section.getSectionName().equals("NEAT-POPULATION")
          && section.getSubSectionName().equals("INNOVATIONS")) {
        for (String line : section.getLines()) {
          List<String> cols = EncogFileSection.splitColumns(line);
          NEATInnovation innovation = new NEATInnovation();
View Full Code Here

TOP

Related Classes of org.encog.persist.EncogReadHelper

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.