java.lang.Object
edu.cmu.tetrad.algcomparison.independence.Gin
All Implemented Interfaces:
IndependenceWrapper, HasParameters, TetradSerializable, Serializable

@TestOfIndependence(name="GIN (Residual Independence)", command="gin-test", dataType=Continuous) @General public class Gin extends Object implements IndependenceWrapper
Wrapper for GIN (Generalized Independent Noise) residual-independence test. By default uses OLS(ridge=1e-8) for residualization and dCor backend with an *approximate* p-value unless permutations > 0 is specified. Exposed parameters (proposed; add to Params as needed): - Params.ALPHA - Params.GIN_BACKEND // "dcor" (default) or "pearson" - Params.GIN_PERMUTATIONS // int, default 0 (use approx p for dCor) - Params.GIN_RIDGE // double, default 1e-8 - Params.SEED // (optional; included for consistency)
See Also:
  • Constructor Details

    • Gin

      public Gin()
      Default constructor for the Gin class. This constructor initializes an instance of the Gin class.
  • Method Details

    • getTest

      public IndependenceTest getTest(DataModel dataModel, Parameters parameters)
      Configures and returns an IndependenceTest object based on the provided data model and parameters. This method initializes the independence test with specific settings such as significance level (alpha), the backend method for testing, number of permutations, ridge regression value, and verbosity.
      Specified by:
      getTest in interface IndependenceWrapper
      Parameters:
      dataModel - The data model on which this independence test is to be configured and run. It must be an instance of DataSet.
      parameters - A set of parameters specifying the configuration for the independence test, such as alpha, backend method, number of permutations, ridge value, and verbosity.
      Returns:
      An instance of IndependenceTest with the configured settings, ready for use in conditional independence testing.
    • getDescription

      public String getDescription()
      Provides a description of the GIN (Generalized Independent Noise) residual-independence test. The GIN test reduces conditional independence (X ⟂ Y | S) to unconditional independence between regression residuals (rX and rY).
      Specified by:
      getDescription in interface IndependenceWrapper
      Returns:
      A string describing the GIN residual-independence test.
    • getDataType

      public DataType getDataType()
      Retrieves the data type associated with this test, which indicates that the test operates on continuous data.
      Specified by:
      getDataType in interface IndependenceWrapper
      Returns:
      the data type of this test, represented as a DataType enum value.
    • getParameters

      public List<String> getParameters()
      Retrieves the list of parameters required for this test.
      Specified by:
      getParameters in interface HasParameters
      Specified by:
      getParameters in interface IndependenceWrapper
      Returns:
      a list of parameter names as strings.