Class RandomMimicGraphGenerator

java.lang.Object
edu.cmu.tetrad.search.mimic.RandomMimicGraphGenerator

public final class RandomMimicGraphGenerator extends Object
Generates random MIMIC models.

In singly-connected mode, the latent subgraph is generated as a directed tree, and each measured input and output is attached to exactly one latent. This guarantees that the underlying undirected graph is singly connected.

In general mode, the latent graph is a random DAG, and measured inputs and outputs may be attached to multiple latents.

The generator recognizes the following parameter names if the generate(Parameters) method is used:

  • mimicNumInputs
  • mimicNumLatents
  • mimicNumOutputs
  • mimicSinglyConnected
  • mimicLatentEdgeProb
  • mimicInputAttachProb
  • mimicOutputAttachProb
Author:
josephramsey
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for the RandomMimicGraphGenerator class.
  • Method Summary

    Modifier and Type
    Method
    Description
    generate(int numInputs, int numLatents, int numOutputs, boolean singlyConnected, double latentEdgeProb, double inputAttachProb, double outputAttachProb)
    Generates a random MIMIC model.
    generate(Parameters parameters)
    Generates a random MIMIC model using values read from the given parameters object.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RandomMimicGraphGenerator

      public RandomMimicGraphGenerator()
      Default constructor for the RandomMimicGraphGenerator class. Initializes an instance of the generator, which is capable of generating random MIMIC models through its provided methods.
  • Method Details

    • generate

      public MimicModel generate(Parameters parameters)
      Generates a random MIMIC model using values read from the given parameters object.
      Parameters:
      parameters - the parameters
      Returns:
      the generated model
    • generate

      public MimicModel generate(int numInputs, int numLatents, int numOutputs, boolean singlyConnected, double latentEdgeProb, double inputAttachProb, double outputAttachProb)
      Generates a random MIMIC model.
      Parameters:
      numInputs - number of measured inputs
      numLatents - number of latents
      numOutputs - number of measured outputs
      singlyConnected - whether singly-connected structure should be enforced
      latentEdgeProb - latent-edge probability in general mode
      inputAttachProb - input attachment probability in general mode
      outputAttachProb - output attachment probability in general mode
      Returns:
      the generated model