Class RandomMimicGraphGenerator
java.lang.Object
edu.cmu.tetrad.search.mimic.RandomMimicGraphGenerator
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:
mimicNumInputsmimicNumLatentsmimicNumOutputsmimicSinglyConnectedmimicLatentEdgeProbmimicInputAttachProbmimicOutputAttachProb
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the RandomMimicGraphGenerator class. -
Method Summary
Modifier and TypeMethodDescriptiongenerate(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.
-
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
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 inputsnumLatents- number of latentsnumOutputs- number of measured outputssinglyConnected- whether singly-connected structure should be enforcedlatentEdgeProb- latent-edge probability in general modeinputAttachProb- input attachment probability in general modeoutputAttachProb- output attachment probability in general mode- Returns:
- the generated model
-