Package org.encog.neural.pnn

Examples of org.encog.neural.pnn.BasicPNN


  public final File SERIAL_FILENAME = TEMP_DIR.createFile("encogtest.ser");
   
  public BasicPNN create() {
    PNNOutputMode mode = PNNOutputMode.Regression;

    BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 1);

    BasicMLDataSet trainingSet = new BasicMLDataSet(XOR.XOR_INPUT,
        XOR.XOR_IDEAL);

    System.out.println("Learning...");
View Full Code Here


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

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

    XOR.verifyXOR(network2, 0.001);
  }
View Full Code Here

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

   *
   * @return The neural network.
   */
  @Override
  public MLMethod generate() {
    final BasicPNN pnn = new BasicPNN(this.kernel, this.outmodel,
        this.inputNeurons, this.outputNeurons);
    return pnn;
  }
View Full Code Here

TOP

Related Classes of org.encog.neural.pnn.BasicPNN

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.