cat.utils.normalize

Contents

cat.utils.normalize#

cat.utils.normalize(mat: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], method: Literal['median', 'mean', 'to_one'] = 'median') ndarray#

Normalize count matrix

Parameters:
  • mat (ArrayLike) – Count matrix

  • method (Literal["median", "mean"]) – Normalization methods, by default “median”

Returns:

Normalized count matrix

Return type:

np.ndarray