Package com.neuralnetwork.shared.neurons

Examples of com.neuralnetwork.shared.neurons.SOMLattice


   * Test method for {@link com.neuralnetwork
   * .shared.neurons.SOMLattice#SOMLattice(int, int, int)}.
   */
  @Test
  public final void testSOMLattice() {
    SOMLattice s = new SOMLattice(Constants.FIVE,
                                  Constants.FIVE, Constants.FIVE);
    assertEquals(Constants.FIVE, s.getHeight());
    assertEquals(Constants.FIVE, s.getWidth());
    assertEquals(Constants.FIVE, s.getNeuron(0, 0).getWeights().size());
  }
View Full Code Here


   * Test method for {@link com.neuralnetwork
   * .shared.neurons.SOMLattice#getNeuron(int, int)}.
   */
  @Test
  public final void testGetNeuron() {
    SOMLattice s = new SOMLattice(Constants.FIVE,
                                  Constants.FIVE, Constants.FIVE);
    assertEquals(s.getNeuron(Constants.ONE,
                             Constants.FOUR).getType(), NeuronType.SOM);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.neurons.SOMLattice#getWidth()}.
   */
  @Test
  public final void testGetWidth() {
    SOMLattice s = new SOMLattice(Constants.FIVE,
                                  Constants.FIVE, Constants.FIVE);
    assertEquals(Constants.FIVE, s.getHeight());
    assertEquals(Constants.FIVE, s.getWidth());
    assertEquals(Constants.FIVE, s.getNeuron(0, 0).getWeights().size());
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.neurons.SOMLattice#getHeight()}.
   */
  @Test
  public final void testGetHeight() {
      SOMLattice s = new SOMLattice(Constants.FIVE,
                                    Constants.FIVE, Constants.FIVE);
    assertEquals(Constants.FIVE, s.getHeight());
    assertEquals(Constants.FIVE, s.getWidth());
    assertEquals(Constants.FIVE, s.getNeuron(0, 0).getWeights().size());
  }
View Full Code Here

   * .neurons.SOMLattice#getBMU(
   * com.neuralnetwork.shared.neurons.SOMLayer)}.
   */
  @Test
  public final void testGetBMU() {
      SOMLattice s = new SOMLattice(Constants.FIVE,
                                    Constants.FIVE, Constants.FIVE);
    SOMLayer i = new SOMLayer();
    i.add(0.0);
    i.add(0.0);
    i.add(0.0);
    i.add(0.0);
    i.add(0.0);
    assertEquals(s.getBMU(i).getType(), NeuronType.SOM);
  }
View Full Code Here

          for (int j = 0; j < INPUT_SIZE; j++) {
            input.add(r.nextDouble());
          }
          inData.add(input);
        }
        lattice = new SOMLattice(
            INPUT_SIZE, INPUT_SIZE, INPUT_SIZE);
    }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.neurons.SOMLattice

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.