Package edu.cmu.tetrad.search
Class IcaLingam
java.lang.Object
edu.cmu.tetrad.search.IcaLingam
ICA-LiNGAM (Shimizu et al., 2006), with small numerical hardening to match the stabilized ICA-LiNG-D pipeline.
Changes vs. the earlier version: - Optionally threshold W before Hungarian assignment (reduces spurious diagonals). - After forming B̂ via IcaLingD.getScaledBHat (guarded diag), hard-threshold B̂ using bThreshold prior to acyclicity trimming. - Always return a (possibly empty) trimmed matrix (never null).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFits a dataset to estimate a weight matrix using the ICA-LiNGAM algorithm.Processes a given matrix W to generate a scaled and trimmed matrix B̂ that is guaranteed to correspond to an acyclic directed graph (DAG).booleanChecks whether the graph induced by the scaled coefficient matrix represents an acyclic directed graph (DAG).voidsetBThreshold(double bThreshold) Threshold for |B_ij| -> 0 before trimming.voidsetVerbose(boolean verbose) Verbose logging.voidsetWThreshold(double wThreshold) Optional pre-threshold for |W_ij| -> 0 before Hungarian; set to 0 to disable (default).
-
Constructor Details
-
IcaLingam
public IcaLingam()Constructor for the IcaLingam class. Initializes an instance of the ICA-LiNGAM algorithm for causal discovery. This class provides methods to estimate causal structures from observational data, ensuring acyclic causal graphs and performing weight matrix estimation and processing.
-
-
Method Details
-
fit
Fits a dataset to estimate a weight matrix using the ICA-LiNGAM algorithm. The method utilizes stabilized FastICA for the estimation process and further processes the weights to ensure they conform to an acyclic structure.- Parameters:
D- the dataset, represented as a DataSet object, which includes the observed data necessary for estimating the weight matrix.- Returns:
- a matrix representing acyclic trimmed weights derived from the dataset.
-
getAcyclicTrimmedBHat
Processes a given matrix W to generate a scaled and trimmed matrix B̂ that is guaranteed to correspond to an acyclic directed graph (DAG). The method applies optional denoising, diagonal maximization via the Hungarian algorithm, hard-thresholding, and iterative edge trimming to ensure the acyclicity of B̂.- Parameters:
W- the input matrix representing initial weights or coefficients; it will be processed to produce an acyclic trimmed matrix.- Returns:
- a matrix B̂ that corresponds to an acyclic directed graph derived from the input matrix W.
-
isAcyclic
Checks whether the graph induced by the scaled coefficient matrix represents an acyclic directed graph (DAG).- Parameters:
scaledBHat- the scaled coefficient matrix used to construct the graph.- Returns:
- true if the graph is acyclic, otherwise false.
-
setBThreshold
public void setBThreshold(double bThreshold) Threshold for |B_ij| -> 0 before trimming.- Parameters:
bThreshold- the threshold value for B_ij coefficients.
-
setWThreshold
public void setWThreshold(double wThreshold) Optional pre-threshold for |W_ij| -> 0 before Hungarian; set to 0 to disable (default).- Parameters:
wThreshold- the threshold value for W_ij coefficients.
-
setVerbose
public void setVerbose(boolean verbose) Verbose logging.- Parameters:
verbose- whether to enable verbose logging.
-