Package org.encog.neural.art

Examples of org.encog.neural.art.ART1


  public final File EG_FILENAME = TEMP_DIR.createFile("encogtest.eg");
  public final File SERIAL_FILENAME = TEMP_DIR.createFile("encogtest.ser");
   
  private ART1 create()
  {
    ART1 network = new ART1(6,3);
    network.getWeightsF1toF2().set(1, 1, 2.0);
    network.getWeightsF2toF1().set(2, 2, 3.0);
    return network;
  }
View Full Code Here


    return network;
  }
 
  public void testPersistEG()
  {
    ART1 network = create();

    EncogDirectoryPersistence.saveObject(EG_FILENAME, network);
    ART1 network2 = (ART1)EncogDirectoryPersistence.loadObject(EG_FILENAME);

    validate(network2);
  }
View Full Code Here

    validate(network2);
  }
 
  public void testPersistSerial() throws IOException, ClassNotFoundException
  {
    ART1 network = create();
   
    SerializeObject.save(SERIAL_FILENAME, network);
    ART1 network2 = (ART1)SerializeObject.load(SERIAL_FILENAME);
       
    validate(network2);
  }
View Full Code Here

   *
   * @return The generated neural network.
   */
  public final MLMethod generate() {

    ART1 art = new ART1(this.inputNeurons, this.outputNeurons);
    art.setA1(this.a1);
    art.setB1(this.b1);
    art.setC1(this.c1);
    art.setD1(this.d1);
    art.setL(this.l);
    art.setVigilance(this.vigilance);
    return art;
  }
View Full Code Here

    }
  }

  public void run() {
    this.setupInput();
    ART1 logic = new ART1(INPUT_NEURONS,OUTPUT_NEURONS);

    for (int i = 0; i < PATTERN.length; i++) {
      BiPolarNeuralData in = new BiPolarNeuralData(this.input[i]);
      BiPolarNeuralData out = new BiPolarNeuralData(OUTPUT_NEURONS);
      logic.compute(in, out);
      if (logic.hasWinner()) {
        System.out.println(PATTERN[i] + " - " + logic.getWinner());
      } else {
        System.out.println(PATTERN[i]
            + " - new Input and all Classes exhausted");
      }
    }
View Full Code Here

   *
   * @return The generated neural network.
   */
  public MLMethod generate() {

    ART1 art = new ART1(this.inputNeurons, this.outputNeurons);
    art.setA1(this.a1);
    art.setB1(this.b1);
    art.setC1(this.c1);
    art.setD1(this.d1);
    art.setL(this.l);
    art.setVigilance(this.vigilance);
    return art;
  }
View Full Code Here

  public final File EG_FILENAME = TEMP_DIR.createFile("encogtest.eg");
  public final File SERIAL_FILENAME = TEMP_DIR.createFile("encogtest.ser");
   
  private ART1 create()
  {
    ART1 network = new ART1(6,3);
    network.getWeightsF1toF2().set(1, 1, 2.0);
    network.getWeightsF2toF1().set(2, 2, 3.0);
    return network;
  }
View Full Code Here

    return network;
  }
 
  public void testPersistEG()
  {
    ART1 network = create();

    EncogDirectoryPersistence.saveObject(EG_FILENAME, network);
    ART1 network2 = (ART1)EncogDirectoryPersistence.loadObject(EG_FILENAME);

    validate(network2);
  }
View Full Code Here

    validate(network2);
  }
 
  public void testPersistSerial() throws IOException, ClassNotFoundException
  {
    ART1 network = create();
   
    SerializeObject.save(SERIAL_FILENAME, network);
    ART1 network2 = (ART1)SerializeObject.load(SERIAL_FILENAME);
       
    validate(network2);
  }
View Full Code Here

TOP

Related Classes of org.encog.neural.art.ART1

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.