matrix_describe#

caf.van.matrix_validation.matrix_describe(matrix, almost_zero=None)[source]#

Provide descriptive statistics of matrix.

Parameters:
  • matrix (pd.DataFrame) – 2D matrix of values with zones as the columns and index.

  • almost_zero (float, optional) – Any values less than this are counted as almost zero in the output. If not given it is calculated at 1 / matrix.size.

Returns:

Matrix statistics containing: percentiles (5%, 25%, 50%, 75% and 95%), mean, std, min, max, sum (total), zeros (count), almost zeros (count) and NaNs (count).

Return type:

pd.Series