Class IcaLingam

java.lang.Object
edu.cmu.tetrad.search.IcaLingam

public class IcaLingam extends Object
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
    Constructor
    Description
    Constructor for the IcaLingam class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Fits 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).
    boolean
    isAcyclic(Matrix scaledBHat)
    Checks whether the graph induced by the scaled coefficient matrix represents an acyclic directed graph (DAG).
    void
    setBThreshold(double bThreshold)
    Threshold for |B_ij| -> 0 before trimming.
    void
    setVerbose(boolean verbose)
    Verbose logging.
    void
    setWThreshold(double wThreshold)
    Optional pre-threshold for |W_ij| -> 0 before Hungarian; set to 0 to disable (default).

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public Matrix fit(DataSet D)
      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

      public Matrix getAcyclicTrimmedBHat(Matrix W)
      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

      public boolean isAcyclic(Matrix scaledBHat)
      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.