tacco.preprocessing.check_counts_validity

check_counts_validity(X, delta=0.0001, head=1000, raise_exception=True)[source]

Checks whether matrix looks like it is a unnormalized uncentered count matrix

Parameters:
  • X – Dense or sparse counts matrix.

  • delta – The maximum absolute deviation from integer numbers to tolerate.

  • head – The number of sored values of the count matrix to check for dviation from integer numbers.

  • raise_exception – Whether to raise an exception for invalid counts or just silently return False.

Returns:

Returns whether the count matrix is valid, except when it is not and raise_exception is True.