Exemplo n.º 1
0
  /**
   * Set the RBF components to random values.
   *
   * @param min Minimum random value.
   * @param max Max random value.
   * @param t The type of RBF to use.
   */
  public void randomizeRBFCentersAndWidths(final double min, final double max, final RBFEnum t) {
    final int dimensions = getInputCount();
    final double[] centers = new double[dimensions];

    for (int i = 0; i < dimensions; i++) {
      centers[i] = RangeRandomizer.randomize(min, max);
    }

    for (int i = 0; i < this.flat.getRBF().length; i++) {
      setRBFFunction(i, t, centers, RangeRandomizer.randomize(min, max));
    }
  }
Exemplo n.º 2
0
 /**
  * Array containing center position. Row n contains centers for neuron n. Row n contains x
  * elements for x number of dimensions.
  *
  * @param centers The centers.
  * @param widths Array containing widths. Row n contains widths for neuron n. Row n contains x
  *     elements for x number of dimensions.
  * @param t The RBF Function to use for this layer.
  */
 public void setRBFCentersAndWidths(
     final double[][] centers, final double[] widths, final RBFEnum t) {
   for (int i = 0; i < this.flat.getRBF().length; i++) {
     setRBFFunction(i, t, centers[i], widths[i]);
   }
 }