Examples of BasicPNN


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

Examples of org.encog.neural.pnn.BasicPNN

    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

Examples of org.encog.neural.pnn.BasicPNN

    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

Examples of org.encog.neural.pnn.BasicPNN

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

Examples of org.encog.neural.pnn.BasicPNN

  @Test
  public void testRegPNN() throws Throwable
  {
   
    PNNOutputMode mode = PNNOutputMode.Regression;
    BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 1);

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

    TrainBasicPNN train = new TrainBasicPNN(network, trainingSet);
View Full Code Here

Examples of org.encog.neural.pnn.BasicPNN

  @Test
  public void testClassifyPNN() throws Throwable
  {
   
    PNNOutputMode mode = PNNOutputMode.Classification;
    BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 2);

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

    TrainBasicPNN train = new TrainBasicPNN(network, trainingSet);
View Full Code Here

Examples of org.encog.neural.pnn.BasicPNN

      kernel = PNNKernelType.Reciprocal;
    } else {
      throw new NeuralNetworkError("Unknown kernel: " + kernelStr);
    }
     
    final BasicPNN result = new BasicPNN(kernel, outmodel,
        inputCount, outputCount);

    return result;
  }
View Full Code Here

Examples of org.encog.neural.pnn.BasicPNN

      kernel = PNNKernelType.Reciprocal;
    } else {
      throw new NeuralNetworkError("Unknown kernel: " + kernelStr);
    }
     
    final BasicPNN result = new BasicPNN(kernel, outmodel,
        inputCount, outputCount);

    return result;
  }
View Full Code Here

Examples of org.encog.neural.pnn.BasicPNN

  @Test
  public void testRegPNN() throws Throwable
  {
   
    PNNOutputMode mode = PNNOutputMode.Regression;
    BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 1);

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

    TrainBasicPNN train = new TrainBasicPNN(network, trainingSet);
View Full Code Here

Examples of org.encog.neural.pnn.BasicPNN

  @Test
  public void testClassifyPNN() throws Throwable
  {
   
    PNNOutputMode mode = PNNOutputMode.Classification;
    BasicPNN network = new BasicPNN(PNNKernelType.Gaussian, mode, 2, 2);

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

    TrainBasicPNN train = new TrainBasicPNN(network, trainingSet);
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.