mobgap.laterality.evaluation.lrc_final_agg#

mobgap.laterality.evaluation.lrc_final_agg(
agg_results: dict[str, float],
single_results: dict[str, list],
pipeline: LrcEmulationPipeline,
dataset: BaseGaitDatasetWithReference,
) tuple[dict[str, any], dict[str, list[any]]][source]#

Aggregate the results of the LRC pipeline.

Warning

This function is not meant to be called directly, but as final_aggregator in a tpcp.validate.Scorer. If you are writing custom scoring functions, you can use this function as a template or wrap it in a new function.

This function only applies a single aggregation step beyond the default aggregation. It combines the raw predictions into a single data frame across all datapoints to make them easier to parse.

Parameters:
agg_results

The aggregated results from all datapoints (see Scorer).

single_results

The per-datapoint results (see Scorer).

pipeline

The pipeline that was passed to the scorer. This is ignored in this function, but might be useful in custom final aggregators.

dataset

The dataset that was passed to the scorer.

Returns:
final_agg_results

The final aggregated results.

final_single_results

The per-datapoint results, that are not aggregated.