matrix_describe#

caf.toolkit.pandas_utils.matrices.matrix_describe(matrix, almost_zero=None)[source]#

Create a high level summary of a matrix.

Stack Matrix before calling pandas describe with additional metrics added.

Parameters:
  • matrix (pd.DataFrame) – Matrix to be summarised.

  • almost_zero (float, optional) – Below this value cells will be defined as almost zero. If not given, will be calculated as = 1 / (# of cells in the matrix).

Returns:

Matrix summary statistics, expands upon the standard pandas.Series.describe. Includes 5%, 25%, 50%, 75%, 95% Percentiles Mean Count (total, zeros and almost zeros) Standard Deviation Minimum and Maximum

Return type:

pd.Series

See also

None