Class AdditiveAnmSimulator
java.lang.Object
edu.cmu.tetrad.algcomparison.simulation.AdditiveAnmSimulator
- All Implemented Interfaces:
Simulation,HasParameters,TetradSerializable,Serializable
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 Summary
ConstructorsConstructorDescriptionAdditiveAnmSimulator(RandomGraph graph) Constructs an instance of AdditiveAnmSimulation using the provided random graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateData(Parameters parameters, boolean newModel) Creates data for the simulation using the provided parameters and model.getDataModel(int index) Retrieves the simulated data set at the specified index.Retrieves the data type of the simulation.Retrieves a description of the simulation.intRetrieves the number of data models generated by the simulation.Retrieves the list of parameters used in the simulation.Class<? extends RandomGraph> Retrieves the class of the random graph used in the simulation.Retrieves the short name of the simulation.Class<? extends Simulation> Retrieves the class of the simulation.getTrueGraph(int index) Retrieves the true graph corresponding to the specified index.
-
Constructor Details
-
AdditiveAnmSimulator
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
Creates data for the simulation using the provided parameters and model.- Specified by:
createDatain interfaceSimulation- Parameters:
parameters- The parameters to use in the simulation.newModel- If true, a new model is created. If false, the model is reused.
-
getTrueGraph
Retrieves the true graph corresponding to the specified index.- Specified by:
getTrueGraphin interfaceSimulation- 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:
getNumDataModelsin interfaceSimulation- Returns:
- the number of data models
-
getDataModel
Retrieves the simulated data set at the specified index.- Specified by:
getDataModelin interfaceSimulation- Parameters:
index- The index of the desired simulated data set.- Returns:
- the simulated data set at the specified index
-
getDataType
Retrieves the data type of the simulation.- Specified by:
getDataTypein interfaceSimulation- Returns:
- the data type
-
getDescription
Retrieves a description of the simulation.- Specified by:
getDescriptionin interfaceSimulation- Returns:
- a description of the simulation
-
getShortName
Retrieves the short name of the simulation.- Specified by:
getShortNamein interfaceSimulation- Returns:
- the short name
-
getRandomGraphClass
Retrieves the class of the random graph used in the simulation.- Specified by:
getRandomGraphClassin interfaceSimulation- Returns:
- the class of the random graph
-
getSimulationClass
Retrieves the class of the simulation.- Specified by:
getSimulationClassin interfaceSimulation- Returns:
- the class of the simulation
-
getParameters
Retrieves the list of parameters used in the simulation.- Specified by:
getParametersin interfaceHasParameters- Specified by:
getParametersin interfaceSimulation- Returns:
- the list of parameters
-