API reference#
earthcarekit.stats
Statistics utilities.
Notes#
This module does not depend on other internal modules.
get_hist_mean
#
Estimate mean from a histogram.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
ArrayLike
|
Values of the histogram (e.g., counts or density). |
required |
centers
|
ArrayLike
|
Sequence of monotonically increasing bin centers of the histogram (length( |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The scalar estimated mean. |
Source code in earthcarekit/stats/_histogram.py
get_hist_median
#
Estimate median from a histogram.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
ArrayLike
|
Values of the histogram (e.g., counts or density). |
required |
edges
|
ArrayLike
|
Sequence of monotonically increasing bin edges of the histogram (length( |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The scalar estimated median (i.e., 50-th percentile). |
Source code in earthcarekit/stats/_histogram.py
get_hist_percentile
#
Estimate q-th percentile from a histogram.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
ArrayLike
|
Values of the histogram (e.g., counts or density). |
required |
edges
|
ArrayLike
|
Sequence of monotonically increasing bin edges of the histogram (length( |
required |
q
|
float
|
Percentage of the percentile to compute (0-100). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The scalar estimated |
Source code in earthcarekit/stats/_histogram.py
nan_diff_of_means
#
Difference between means of target and prediction (i.e., mean(target) - mean(prediction)).
Source code in earthcarekit/stats/_omitna.py
nan_mae
#
Mean absolute error (MAE)
Source code in earthcarekit/stats/_omitna.py
nan_max
#
Compute the maximum while ignoring NaNs.
Source code in earthcarekit/stats/_omitna.py
nan_mean
#
Compute the mean while ignoring NaNs.
Source code in earthcarekit/stats/_omitna.py
nan_mean_diff
#
Mean of element-wise differences (i.e., mean(target - prediction)).
Source code in earthcarekit/stats/_omitna.py
nan_min
#
Compute the minimum while ignoring NaNs.
Source code in earthcarekit/stats/_omitna.py
nan_rmse
#
Root mean squared error (RMSE)
Source code in earthcarekit/stats/_omitna.py
nan_sem
#
Compute the standard error of the mean while ignoring NaNs.
Source code in earthcarekit/stats/_omitna.py
nan_std
#
Compute the standard deviation while ignoring NaNs.