Package edu.cmu.tetrad.search.utils
Class RandomRBF
java.lang.Object
edu.cmu.tetrad.search.utils.RandomRBF
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
ConstructorsConstructorDescriptionRandomRBF(int numCenters, double sigma) Constructs a RandomRBF instance with randomly initialized centers and amplitudes. -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute(double x) Computes the Radial Basis Function (RBF) value for the given input using pre-initialized centers, amplitudes, and width parameter (sigma).doublecomputeAdjusted(double x) Computes the adjusted value of the Radial Basis Function (RBF) for the given input.static voidThe entry point of the application.
-
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
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
-