Class BayesNetSimulation

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

public class BayesNetSimulation extends Object implements Simulation
Bayes net simulation.
Author:
josephramsey
See Also:
  • Constructor Details

    • BayesNetSimulation

      public BayesNetSimulation(RandomGraph graph)
      Constructs a new BayesNetSimulation.
      Parameters:
      graph - The graph.
    • BayesNetSimulation

      public BayesNetSimulation(BayesPm pm)
      Constructs a new BayesNetSimulation.
      Parameters:
      pm - The Bayes PM.
    • BayesNetSimulation

      public BayesNetSimulation(BayesIm im)
      Constructs a new BayesNetSimulation.
      Parameters:
      im - The Bayes IM.
  • Method Details

    • createData

      public void createData(Parameters parameters, boolean newModel)
      Creates the data.
      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.
    • getDataModel

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

      public Graph getTrueGraph(int index)
      Returns the true graph.
      Specified by:
      getTrueGraph in interface Simulation
      Parameters:
      index - The index of the desired true graph.
      Returns:
      Ibid.
    • getDescription

      public String getDescription()
      Returns the description.
      Specified by:
      getDescription in interface Simulation
      Returns:
      Ibid.
    • getParameters

      public List<String> getParameters()
      Returns the parameters.
      Specified by:
      getParameters in interface HasParameters
      Specified by:
      getParameters in interface Simulation
      Returns:
      Ibid.
    • getNumDataModels

      public int getNumDataModels()
      Returns the number of data sets.
      Specified by:
      getNumDataModels in interface Simulation
      Returns:
      Ibid.
    • getDataType

      public DataType getDataType()
      Returns the data type.
      Specified by:
      getDataType in interface Simulation
      Returns:
      Ibid.
    • getBayesIms

      public List<BayesIm> getBayesIms()
      Returns the list of Bayes IMs.
      Returns:
      Ibid.