Class MultiLayerPerceptronFunction1D

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

public class MultiLayerPerceptronFunction1D extends Object
This class implements a 1-dimensional Multi-Layer Perceptron (MLP) function. It consists of a single hidden layer and scales the input to introduce variability or "bumpiness" as needed. The activation function for the hidden layer and weights/biases for the neural network are initialized during construction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultiLayerPerceptronFunction1D(int hiddenDimension, double inputScale, Function<Double,Double> activation, long seed)
    Constructor to initialize a random function.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    evaluate(double x)
    Evaluates the random function for a given input.
    static void
    main(String[] args)
    The entry point of the application that demonstrates the usage of the MultiLayerPerceptronFunction1D class by defining a random function with specific parameters and evaluating it over a range of inputs.

    Methods inherited from class java.lang.Object

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

    • MultiLayerPerceptronFunction1D

      public MultiLayerPerceptronFunction1D(int hiddenDimension, double inputScale, Function<Double,Double> activation, long seed)
      Constructor to initialize a random function.
      Parameters:
      hiddenDimension - Number of neurons in the hidden layer.
      inputScale - Scaling factor for the input to create bumpiness.
      activation - Activation function (e.g., Math::sin or Math::tanh).
      seed - Random seed for reproducibility.
  • Method Details

    • main

      public static void main(String[] args)
      The entry point of the application that demonstrates the usage of the MultiLayerPerceptronFunction1D class by defining a random function with specific parameters and evaluating it over a range of inputs.
      Parameters:
      args - Command-line arguments passed to the program.
    • evaluate

      public double evaluate(double x)
      Evaluates the random function for a given input.
      Parameters:
      x - Input value in R.
      Returns:
      Output value in R.