Class Gin
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the data type associated with this test, which indicates that the test operates on continuous data.Provides a description of the GIN (Generalized Independent Noise) residual-independence test.Retrieves the list of parameters required for this test.getTest(DataModel dataModel, Parameters parameters) Configures and returns an IndependenceTest object based on the provided data model and parameters.
-
Constructor Details
-
Gin
public Gin()Default constructor for the Gin class. This constructor initializes an instance of the Gin class.
-
-
Method Details
-
getTest
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:
getTestin interfaceIndependenceWrapper- 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
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:
getDescriptionin interfaceIndependenceWrapper- Returns:
- A string describing the GIN residual-independence test.
-
getDataType
Retrieves the data type associated with this test, which indicates that the test operates on continuous data.- Specified by:
getDataTypein interfaceIndependenceWrapper- Returns:
- the data type of this test, represented as a
DataTypeenum value.
-
getParameters
Retrieves the list of parameters required for this test.- Specified by:
getParametersin interfaceHasParameters- Specified by:
getParametersin interfaceIndependenceWrapper- Returns:
- a list of parameter names as strings.
-