OASIS_pvalue

oasis_stat.OASIS_pvalue(X, numSplits=5, trainFrac=0.25, asymptotic=False, return_f_c=False, return_test_stat=False, return_effect_size=False, random_seed=0)[source]

Computes the p-value using the OASIS method.

Parameters:
  • X (numpy.ndarray) – The input count matrix, IxJ.

  • numSplits (int, optional) – The number of train/test splits for computing optimized f,c on. Default is 5

  • trainFrac (float, optional) – The fraction of data to be used for training. Default is 0.25.

  • asymptotic (bool, optional) – Whether to use the asymptotic p-value. Default is False (uses finite sample p-value).

  • return_f_c (bool, optional) – Whether to return the row and column embeddings. Default is False.

  • return_test_stat (bool, optional) – Whether to return the test statistic. Default is False.

  • return_effect_size (bool, optional) – Whether to return the effect size. Default is False.

  • random_seed (int, optional) – The random seed for reproducibility. Default is 0.

Returns:

A tuple containing the following elements (just the float p-value returned if none of the additional flags are true)::
  • pv (float): The minimum p-value computed across all splits, multiplied by the number of splits (Bonferroni correction). The returned value is capped at 1.

  • f (numpy.ndarray, optional): Length I row embedding vector, f. Returned only if return_f_c is True.

  • c (numpy.ndarray, optional): Length J column embedding vector, c. Returned only if return_f_c is True.

  • test_stat (float, optional): The OASIS test statistic. Returned only if return_test_stat is True.

  • effect_size (float, optional): The effect size measure. Returned only if return_effect_size is True.

Return type:

tuple

Description

Primary function for computing OASIS pvalue. Generates random splits, optimizes embeddings over training data and computes on test, returns results for best split corrected for multiple hypothesis testing.