aidevelopementtoolkit.data_utils.statistics
get_numerical_statistics(values: np.ndarray) -> Tuple[float, float, float, float]
Compute basic numerical statistics for a 1D array of values.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Notes
The function ignores NaN values in the input array when computing statistics.
Examples:
>>> import numpy as np
>>> values = np.array([1.0, 2.0, 3.0, np.nan])
>>> get_numerical_statistics(values)
(1.0, 3.0, 2.0, 0.816496580927726)
Source code in aidevelopementtoolkit/data_utils/statistics.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | |