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.

@FunctionalInterface public interface RawMarginalIndependenceTest
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 Type
    Method
    Description
    double
    computePValue(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 double
    computePValue(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

      double computePValue(double[] x, double[] y) throws InterruptedException
      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 doubles
      y - 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

      default double computePValue(double[] x, double[][] Y) throws InterruptedException
      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 n
      Y - 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