Class BayesNetSimulation
java.lang.Object
edu.cmu.tetrad.algcomparison.simulation.BayesNetSimulation
- All Implemented Interfaces:
Simulation
,HasParameters
,TetradSerializable
,Serializable
Bayes net simulation.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBayesNetSimulation
(RandomGraph graph) Constructs a new BayesNetSimulation.Constructs a new BayesNetSimulation.Constructs a new BayesNetSimulation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createData
(Parameters parameters, boolean newModel) Creates the data.Returns the list of Bayes IMs.getDataModel
(int index) Returns the simulated data set.Returns the data type.Returns the description.int
Returns the number of data sets.Returns the parameters.getTrueGraph
(int index) Returns the true graph.
-
Constructor Details
-
BayesNetSimulation
Constructs a new BayesNetSimulation.- Parameters:
graph
- The graph.
-
BayesNetSimulation
Constructs a new BayesNetSimulation.- Parameters:
pm
- The Bayes PM.
-
BayesNetSimulation
Constructs a new BayesNetSimulation.- Parameters:
im
- The Bayes IM.
-
-
Method Details
-
createData
Creates the data.- Specified by:
createData
in interfaceSimulation
- Parameters:
parameters
- The parameters to use in the simulation.newModel
- If true, a new model is created. If false, the model is reused.
-
getDataModel
Returns the simulated data set.- Specified by:
getDataModel
in interfaceSimulation
- Parameters:
index
- The index of the desired simulated data set.- Returns:
- Ibid.
-
getTrueGraph
Returns the true graph.- Specified by:
getTrueGraph
in interfaceSimulation
- Parameters:
index
- The index of the desired true graph.- Returns:
- Ibid.
-
getDescription
Returns the description.- Specified by:
getDescription
in interfaceSimulation
- Returns:
- Ibid.
-
getParameters
Returns the parameters.- Specified by:
getParameters
in interfaceHasParameters
- Specified by:
getParameters
in interfaceSimulation
- Returns:
- Ibid.
-
getNumDataModels
public int getNumDataModels()Returns the number of data sets.- Specified by:
getNumDataModels
in interfaceSimulation
- Returns:
- Ibid.
-
getDataType
Returns the data type.- Specified by:
getDataType
in interfaceSimulation
- Returns:
- Ibid.
-
getBayesIms
Returns the list of Bayes IMs.- Returns:
- Ibid.
-