Class IndTestDegenerateGaussianLrtFullSample

java.lang.Object
edu.cmu.tetrad.search.test.IndTestDegenerateGaussianLrtFullSample
All Implemented Interfaces:
IndependenceTest, RowsSettable, EffectiveSampleSizeSettable

@Deprecated(since="7.9", forRemoval=false) public class IndTestDegenerateGaussianLrtFullSample extends Object implements IndependenceTest, EffectiveSampleSizeSettable, RowsSettable
Deprecated.
The IndTestBasisFunctionLrt class performs conditional independence testing using basis functions within the context of a generalized likelihood ratio test (GLRT). This class is designed for evaluating whether two variables are conditionally independent given a set of conditioning variables, leveraging statistical and matrix-based computations.

This class may be compared to the covariance version (see), which is more scalable to large sample sizes. The advantage of this implementation is that rows may be subsetted randomly for individual conditional independence tests. This is not something that can be done using a covariance matrix as a sufficient statistic.

Author:
josephramsey, bryanandrews
See Also:
  • Constructor Details

    • IndTestDegenerateGaussianLrtFullSample

      public IndTestDegenerateGaussianLrtFullSample(DataSet dataSet)
      Deprecated.
      Constructs an instance of the IndTestBasisFunctionLrt class. This constructor initializes the object using the provided dataset and configuration parameters for truncation limit, basis type, and basis scale. It processes the input dataset to create the necessary embeddings and initializes key components such as the BIC score for later use in independence testing.
      Parameters:
      dataSet - the input data set to be used for the analysis. It must not be null. May contain a mixture of continuous and discrete variables.
      Throws:
      NullPointerException - if the provided dataSet is null.
  • Method Details

    • computeOLS

      public static org.ejml.simple.SimpleMatrix computeOLS(org.ejml.simple.SimpleMatrix B, org.ejml.simple.SimpleMatrix X, double lambda)
      Deprecated.
      Computes the Ordinary Least Squares (OLS) solution for a linear system. The method applies regularization to the OLS problem to stabilize the solution, particularly in cases where the design matrix B is ill-conditioned or near singular. Regularization is controlled by the lambda parameter, which adds a scaled identity matrix to the design matrix's normal equation.
      Parameters:
      B - the design matrix, where rows correspond to observations and columns correspond to features.
      X - the response matrix, where rows correspond to observations and columns to dependent variable outputs.
      lambda - the regularization parameter used to stabilize the solution. Larger values result in stronger regularization.
      Returns:
      the computed OLS solution as a SimpleMatrix object.
    • checkIndependence

      public IndependenceResult checkIndependence(Node x, Node y, Set<Node> z)
      Deprecated.
      Tests for the conditional independence of two nodes, x and y, given a set of conditioning nodes z. The method evaluates the independence using a generalized likelihood ratio test and p-value computation.
      Specified by:
      checkIndependence in interface IndependenceTest
      Parameters:
      x - the first Node to test for independence.
      y - the second Node to test for independence.
      z - a set of conditioning nodes; the test checks the independence of x and y conditioned on these nodes.
      Returns:
      an IndependenceResult object containing the result of the independence test, including whether x and y are independent, the computed p-value, and other associated data.
    • getVariables

      public List<Node> getVariables()
      Deprecated.
      Retrieves the list of nodes (variables) associated with this instance.
      Specified by:
      getVariables in interface IndependenceTest
      Returns:
      a list of Node objects representing the variables.
    • getData

      public DataModel getData()
      Deprecated.
      Retrieves the data model associated with this instance.
      Specified by:
      getData in interface IndependenceTest
      Returns:
      the current DataModel instance held by this class.
    • isVerbose

      public boolean isVerbose()
      Deprecated.
      Indicates whether verbose mode is enabled. Verbose mode, when enabled, typically results in detailed logging or diagnostic information being output.
      Specified by:
      isVerbose in interface IndependenceTest
      Returns:
      true if verbose mode is enabled; false otherwise.
    • setVerbose

      public void setVerbose(boolean verbose)
      Deprecated.
      Sets the verbose mode for logging or output behavior. When verbose mode is enabled, detailed information about the processing can be printed or logged, depending on the implementation.
      Specified by:
      setVerbose in interface IndependenceTest
      Parameters:
      verbose - a boolean flag indicating whether to enable or disable verbose mode. If true, verbose mode is enabled; if false, it is disabled.
    • getAlpha

      public double getAlpha()
      Deprecated.
      Returns the significance level of the independence test.
      Specified by:
      getAlpha in interface IndependenceTest
      Returns:
      this level, default 0.01.
    • setAlpha

      public void setAlpha(double alpha)
      Deprecated.
      Sets the significance level.
      Specified by:
      setAlpha in interface IndependenceTest
      Parameters:
      alpha - This level.
    • getEffectiveSampleSize

      public int getEffectiveSampleSize()
      Deprecated.
      Description copied from interface: EffectiveSampleSizeSettable
      Returns the effective sample size.
      Specified by:
      getEffectiveSampleSize in interface EffectiveSampleSizeSettable
      Returns:
      the effective sample size
    • setEffectiveSampleSize

      public void setEffectiveSampleSize(int effectiveSampleSize)
      Deprecated.
      Sets the sample size to use for the independence test, which may be different from the sample size of the data set or covariance matrix. If not set, the sample size of the data set or covariance matrix is used.
      Specified by:
      setEffectiveSampleSize in interface EffectiveSampleSizeSettable
      Parameters:
      effectiveSampleSize - The sample size to use.
    • getRows

      public List<Integer> getRows()
      Deprecated.
      Returns the rows used in the test.
      Specified by:
      getRows in interface RowsSettable
      Returns:
      The rows used in the test.
    • setRows

      public void setRows(List<Integer> rows)
      Deprecated.
      Allows the user to set which rows are used in the test. Otherwise, all rows are used, except those with missing values.
      Specified by:
      setRows in interface RowsSettable
      Parameters:
      rows - The rows to use for the test. Can be null.
    • setLambda

      public void setLambda(double lambda)
      Deprecated.
      Sets the regularization parameter lambda used in statistical computations or tests. The lambda parameter often helps to stabilize computations, particularly in the presence of ill-conditioned problems.
      Parameters:
      lambda - the regularization parameter to be set. Larger values typically result in stronger regularization. Must be a non-negative value.