Package org.encog.mathutil.rbf

Examples of org.encog.mathutil.rbf.RadialBasisFunction


        final int inputCount = flat.getLayerCounts()[2];

        flat.setRBF(new RadialBasisFunction[hiddenCount]);

        for (final String line : section.getLines()) {
          RadialBasisFunction rbf = null;
          final List<String> cols = EncogFileSection
              .splitColumns(line);
          final String name = "org.encog.mathutil.rbf." + cols.get(0);
          try {
            final Class<?> clazz = Class.forName(name);
            rbf = (RadialBasisFunction) clazz.newInstance();
          } catch (final ClassNotFoundException e) {
            throw new PersistError(e);
          } catch (final InstantiationException e) {
            throw new PersistError(e);
          } catch (final IllegalAccessException e) {
            throw new PersistError(e);
          }

          rbf.setWidth(CSVFormat.EG_FORMAT.parse(cols.get(1)));
          rbf.setPeak(CSVFormat.EG_FORMAT.parse(cols.get(2)));
          rbf.setCenters(new double[inputCount]);

          for (int i = 0; i < inputCount; i++) {
            rbf.getCenters()[i] = CSVFormat.EG_FORMAT.parse(cols
                .get(i + 3));
          }

          flat.getRBF()[index++] = rbf;
        }
View Full Code Here


    final RadialBasisFunction[] funcs = new RadialBasisFunction[length];

    // Iteration over neurons and determine the necessaries
    for (int i = 0; i < length; i++) {
      final RadialBasisFunction basisFunc = this.network.getRBF()[i];

      funcs[i] = basisFunc;

      // This is the value that is changed using other training methods.
      // weights[i] =
View Full Code Here

    Assert.assertEquals(0.0, bubble.function(5, 0),0.1);
    Assert.assertEquals(1.0, bubble.function(5, 5),0.1)
  }
 
  public void testGaussian() throws Throwable {
    RadialBasisFunction radial = new GaussianFunction(0.0,1.0,1.0);
    NeighborhoodRBF1D bubble = new NeighborhoodRBF1D(radial);
    Assert.assertEquals(0.0, bubble.function(5, 0),0.1);
    Assert.assertEquals(1.0, bubble.function(5, 5),0.1);
    Assert.assertEquals(0.6, bubble.function(5, 4),0.1);
  }
View Full Code Here

        final int inputCount = flat.getLayerCounts()[2];

        flat.setRBF(new RadialBasisFunction[hiddenCount]);

        for (final String line : section.getLines()) {
          RadialBasisFunction rbf = null;
          final List<String> cols = EncogFileSection
              .splitColumns(line);
          final String name = "org.encog.mathutil.rbf." + cols.get(0);
          try {
            final Class<?> clazz = Class.forName(name);
            rbf = (RadialBasisFunction) clazz.newInstance();
          } catch (final ClassNotFoundException e) {
            throw new PersistError(e);
          } catch (final InstantiationException e) {
            throw new PersistError(e);
          } catch (final IllegalAccessException e) {
            throw new PersistError(e);
          }

          rbf.setWidth(CSVFormat.EG_FORMAT.parse(cols.get(1)));
          rbf.setPeak(CSVFormat.EG_FORMAT.parse(cols.get(2)));
          rbf.setCenters(new double[inputCount]);

          for (int i = 0; i < inputCount; i++) {
            rbf.getCenters()[i] = CSVFormat.EG_FORMAT.parse(cols
                .get(i + 3));
          }

          flat.getRBF()[index++] = rbf;
        }
View Full Code Here

    Assert.assertEquals(0.0, bubble.function(5, 0),0.1);
    Assert.assertEquals(1.0, bubble.function(5, 5),0.1)
  }
 
  public void testGaussian() throws Throwable {
    RadialBasisFunction radial = new GaussianFunction(0.0,1.0,1.0);
    NeighborhoodRBF1D bubble = new NeighborhoodRBF1D(radial);
    Assert.assertEquals(0.0, bubble.function(5, 0),0.1);
    Assert.assertEquals(1.0, bubble.function(5, 5),0.1);
    Assert.assertEquals(0.6, bubble.function(5, 4),0.1);
  }
View Full Code Here

    final RadialBasisFunction[] funcs = new RadialBasisFunction[length];

    // Iteration over neurons and determine the necessaries
    for (int i = 0; i < length; i++) {
      final RadialBasisFunction basisFunc = this.network.getRBF()[i];

      funcs[i] = basisFunc;

      // This is the value that is changed using other training methods.
      // weights[i] =
View Full Code Here

TOP

Related Classes of org.encog.mathutil.rbf.RadialBasisFunction

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.