compute_pvalue

oasis_stat.compute_pvalue(X, cOpt, fOpt, asymptotic=False)[source]

Computes the OASIS p-value for a given contingency table, row embedding, and column embedding. Note that in order for the p-value to be valid, the row and column embeddings cannot depend on the input count matrix X.

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

  • cOpt (numpy.ndarray) – The column embedding vector, J-dimensional.

  • fOpt (numpy.ndarray) – The row embedding vector, I-dimensional.

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

Returns:

The OASIS p-value.

Return type:

float

Description

Computes p-value