mobgap.gait_sequences.evaluation.gsd_per_datapoint_score#
- mobgap.gait_sequences.evaluation.gsd_per_datapoint_score(
- pipeline: GsdEmulationPipeline,
- datapoint: BaseGaitDatasetWithReference,
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:
all outputs of
calculate_unmatched_gsd_performance_metrics(will be averaged over all datapoints)all outputs of
calculate_matched_gsd_performance_metrics(will be averaged over all datapoints)matches: The matched gait sequences calculated bycategorize_intervals_per_sample(return asno_agg)detected: The detected gait sequences (return asno_agg)reference: The reference gait sequences (return asno_agg)sampling_rate_hz: The sampling rate of the data (return asno_agg)
- 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_aggobject 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 thevalidate/cross_validatefunctions or similar as scorer. This functions will aggregate the results and provide a summary of the performance metrics.