Class AdditiveNoiseSimulation

java.lang.Object
edu.cmu.tetrad.sem.AdditiveNoiseSimulation

public class AdditiveNoiseSimulation extends Object
AdditiveNoiseSimulation

Generates data from an additive-noise structural causal model (ANM):

X_j = f_j(Pa(X_j)) + N_j, with independent noise terms N_j.

Each f_j is represented by a randomly initialized MLP (parents-only input). Root nodes are generated as pure noise.

Parent values are passed through the activation function (bounding them) before entering each node's MLP, so f_j is a bounded-input function by construction. No sample-dependent rescaling is performed.

  • Constructor Details

    • AdditiveNoiseSimulation

      public AdditiveNoiseSimulation(Graph graph, int numSamples, Sampler sampler, int[] hiddenDimensions, double inputScale, Function<Double,Double> activationFunction)
      Constructs a new AdditiveNoiseSimulation instance with the specified parameters.
      Parameters:
      graph - The causal graph representing the structural relationships.
      numSamples - The number of data samples to generate.
      sampler - The sampler for additive noise.
      hiddenDimensions - The dimensions of hidden layers in the MLP.
      inputScale - The scaling factor for input data.
      activationFunction - The activation function for the MLP.
  • Method Details

    • generateData

      public DataSet generateData()
      Generates a synthetic dataset by simulating data propagation through a graph with additive noise. The method creates data for each node in the graph based on its topological order, parent relationships, and random multilayer perceptron (MLP) evaluations, along with additive noise.

      Note: the returned dataset's columns are in topological order, not graph.getNodes() order.

      Returns:
      The generated synthetic dataset.