mobgap.gait_sequences.evaluation.gsd_per_datapoint_score#

mobgap.gait_sequences.evaluation.gsd_per_datapoint_score(
pipeline: GsdEmulationPipeline,
datapoint: BaseGaitDatasetWithReference,
) dict[source]#

Evaluate the performance of a GSD algorithm on a single datapoint.

Warning

This function is not meant to be called directly, but as a scoring function 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 is used to evaluate the performance of a GSD algorithm on a single datapoint. It calculates the performance metrics based on the detected gait sequences and the reference gait sequences.

The following performance metrics are calculated:

Parameters:
pipeline

An instance of GSD emulation pipeline that wraps the algorithm that should be evaluated.

datapoint

The datapoint to be evaluated.

Returns:
dict

A dictionary containing the performance metrics. Note, that some results are wrapped in a no_agg object or other aggregators. The results of this function are not expected to be parsed manually, but rather the function is expected to be used in the context of the validate/cross_validate functions or similar as scorer. This functions will aggregate the results and provide a summary of the performance metrics.