Package edu.cmu.tetrad.search
Interface RawMarginalIndependenceTest
- All Known Implementing Classes:
IndTestBasisFunctionBlocks,IndTestBasisFunctionLrt,IndTestFisherZ,Kci
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for performing a raw marginal independence test.
This interface provides a method to compute the p-value for the statistical test of marginal independence between two variables, represented as double arrays. The test evaluates the null hypothesis that the two variables are statistically independent.
-
Method Summary
Modifier and TypeMethodDescriptiondoublecomputePValue(double[] x, double[] y) Computes the p-value for the statistical test of marginal independence between the two given variables represented by the input arrays.default doublecomputePValue(double[] x, double[][] Y) Computes the p-value for the statistical test of marginal independence between a single variable and a multivariate set of variables.
-
Method Details
-
computePValue
Computes the p-value for the statistical test of marginal independence between the two given variables represented by the input arrays.- Parameters:
x- the first variable, represented as an array of doublesy- the second variable, represented as an array of doubles- Returns:
- the computed p-value for the test of marginal independence
- Throws:
InterruptedException- if the computation is interrupted
-
computePValue
Computes the p-value for the statistical test of marginal independence between a single variable and a multivariate set of variables.Default implementation: fall back to pairwise tests of (x, y_j) for each column y_j in Y, and combine the resulting p-values with Fisherâs method. Implementations that support true multivariate tests (e.g. HSIC, KCI with vector Y) should override this method.
- Parameters:
x- the first variable (scalar), represented as an array of doubles of length nY- the multivariate variable, represented as a 2D array of shape [n][m] (n samples, m variables)- Returns:
- the computed p-value for the test of independence
- Throws:
InterruptedException- if the computation is interrupted
-