Package org.encog.neural.som

Examples of org.encog.neural.som.SOM


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


    // create the training set
    final MLDataSet training = new BasicMLDataSet(
        TestCompetitive.SOM_INPUT, null);

    // Create the neural network.
    SOM network = new SOM(4,2);   
    network.setWeights(new Matrix(MATRIX_ARRAY));

    final BasicTrainSOM train = new BasicTrainSOM(network, 0.4,
        training, new NeighborhoodSingle());
    train.setForceWinner(true);
    int iteration = 0;

    for (iteration = 0; iteration <= 100; iteration++) {
      train.iteration();
    }

    final MLData data1 = new BasicMLData(
        TestCompetitive.SOM_INPUT[0]);
    final MLData data2 = new BasicMLData(
        TestCompetitive.SOM_INPUT[1]);
   
    int result1 = network.classify(data1);
    int result2 = network.classify(data2);
   
    Assert.assertTrue(result1!=result2);

  }
View Full Code Here

   * Generate the RSOM network.
   *
   * @return The neural network.
   */
  public MLMethod generate() {
    SOM som = new SOM(this.inputNeurons,this.outputNeurons);
    som.reset();
    return som;
  }
View Full Code Here

TOP

Related Classes of org.encog.neural.som.SOM

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.