piel.analysis.metrics.statistics#
Functions#
Aggregates a ScalarMetricCollection into a single ScalarMetrics instance. |
Module Contents#
- aggregate_scalar_metrics_collection(metrics_collection: piel.types.ScalarMetricCollection) piel.types.ScalarMetric[source]#
Aggregates a ScalarMetricCollection into a single ScalarMetrics instance.
The aggregation is performed as follows: - mean: Weighted mean based on count. - min: Minimum of all min values. - max: Maximum of all max values. - standard_deviation: Combined standard deviation considering individual means and counts. - count: Sum of all counts. - unit: Must be consistent across all ScalarMetrics.
- Parameters:
metrics_collection (ScalarMetricCollection) – A ScalarMetricsCollection instances to aggregate.
- Returns:
A single ScalarMetrics instance representing the aggregated metrics.
- Return type:
- Raises:
ValueError – If the input list is empty or units are inconsistent.