Class AdditiveAnmSimulator

java.lang.Object
edu.cmu.tetrad.algcomparison.simulation.AdditiveAnmSimulator
All Implemented Interfaces:
Simulation, HasParameters, TetradSerializable, Serializable

public class AdditiveAnmSimulator extends Object implements Simulation
Additive Noise SEM (ANM-style) simulator wrapper for algcomparison.

Model:

   X_j = sum_{k in pa(j)} f_{jk}(X_k) + eps_j
 

This version exposes compact, high-level controls:

  • ANM_PRESET: "smooth_rbf" | "wavy_rbf" | "tanh" | "poly" (family & base richness)
  • ANM_NONLINEARITY: [0,1] slider (scales units-per-edge and edge amplitude)
  • ANM_NOISE_KIND: "beta" | "gaussian" | "student_t"
  • ANM_NOISE_STRENGTH: [0,1] slider (σ of noise after centering/standardizing family base)

Keeps existing post-processing knobs: STANDARDIZE, etc.

See Also:
  • Constructor Details

    • AdditiveAnmSimulator

      public AdditiveAnmSimulator(RandomGraph graph)
      Constructs an instance of AdditiveAnmSimulation using the provided random graph.
      Parameters:
      graph - the random graph to be used for the simulation; must not be null
      Throws:
      NullPointerException - if the provided graph is null
  • Method Details

    • createData

      public void createData(Parameters parameters, boolean newModel)
      Creates data for the simulation using the provided parameters and model.
      Specified by:
      createData in interface Simulation
      Parameters:
      parameters - The parameters to use in the simulation.
      newModel - If true, a new model is created. If false, the model is reused.
    • getTrueGraph

      public Graph getTrueGraph(int index)
      Retrieves the true graph corresponding to the specified index.
      Specified by:
      getTrueGraph in interface Simulation
      Parameters:
      index - the index of the graph to retrieve; must be within the valid range of available graphs
      Returns:
      the graph at the specified index
    • getNumDataModels

      public int getNumDataModels()
      Retrieves the number of data models generated by the simulation.
      Specified by:
      getNumDataModels in interface Simulation
      Returns:
      the number of data models
    • getDataModel

      public DataModel getDataModel(int index)
      Retrieves the simulated data set at the specified index.
      Specified by:
      getDataModel in interface Simulation
      Parameters:
      index - The index of the desired simulated data set.
      Returns:
      the simulated data set at the specified index
    • getDataType

      public DataType getDataType()
      Retrieves the data type of the simulation.
      Specified by:
      getDataType in interface Simulation
      Returns:
      the data type
    • getDescription

      public String getDescription()
      Retrieves a description of the simulation.
      Specified by:
      getDescription in interface Simulation
      Returns:
      a description of the simulation
    • getShortName

      public String getShortName()
      Retrieves the short name of the simulation.
      Specified by:
      getShortName in interface Simulation
      Returns:
      the short name
    • getRandomGraphClass

      public Class<? extends RandomGraph> getRandomGraphClass()
      Retrieves the class of the random graph used in the simulation.
      Specified by:
      getRandomGraphClass in interface Simulation
      Returns:
      the class of the random graph
    • getSimulationClass

      public Class<? extends Simulation> getSimulationClass()
      Retrieves the class of the simulation.
      Specified by:
      getSimulationClass in interface Simulation
      Returns:
      the class of the simulation
    • getParameters

      public List<String> getParameters()
      Retrieves the list of parameters used in the simulation.
      Specified by:
      getParameters in interface HasParameters
      Specified by:
      getParameters in interface Simulation
      Returns:
      the list of parameters