Class RandomRBF

java.lang.Object
edu.cmu.tetrad.search.utils.RandomRBF

public class RandomRBF extends Object
A class that represents a Random Radial Basis Function (RBF) system. This implementation generates RBFs using randomly chosen centers and amplitudes, with a specified width parameter (sigma).
  • Constructor Summary

    Constructors
    Constructor
    Description
    RandomRBF(int numCenters, double sigma)
    Constructs a RandomRBF instance with randomly initialized centers and amplitudes.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    compute(double x)
    Computes the Radial Basis Function (RBF) value for the given input using pre-initialized centers, amplitudes, and width parameter (sigma).
    double
    computeAdjusted(double x)
    Computes the adjusted value of the Radial Basis Function (RBF) for the given input.
    static void
    main(String[] args)
    The entry point of the application.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RandomRBF

      public RandomRBF(int numCenters, double sigma)
      Constructs a RandomRBF instance with randomly initialized centers and amplitudes.
      Parameters:
      numCenters - the number of centers for the radial basis functions.
      sigma - the width parameter of the radial basis functions, controlling the spread.
  • Method Details

    • main

      public static void main(String[] args)
      The entry point of the application. Demonstrates the usage of the RandomRBF class by creating an instance with specified parameters and printing computed outputs for a range of input values. Also includes a verification step to ensure that the adjusted RBF function satisfies f(0) ≈ 0.
      Parameters:
      args - command-line arguments passed to the program. Not used in this implementation.
    • compute

      public double compute(double x)
      Computes the Radial Basis Function (RBF) value for the given input using pre-initialized centers, amplitudes, and width parameter (sigma).
      Parameters:
      x - the input value for which the RBF value is to be computed
      Returns:
      the computed RBF value for the given input
    • computeAdjusted

      public double computeAdjusted(double x)
      Computes the adjusted value of the Radial Basis Function (RBF) for the given input. The adjustment ensures that the RBF value is relative to its value at x = 0.
      Parameters:
      x - the input value for which the adjusted RBF value is to be computed
      Returns:
      the adjusted RBF value for the given input