get_error_by_group#

pepbench.data_handling.get_error_by_group(results_per_sample: DataFrame, error_metric: str = 'absolute_error_per_sample_ms', grouper: str_t = 'participant') DataFrame[source]#

Compute mean and standard deviation of the error metric by group.

Parameters:
results_per_samplepandas.DataFrame

The results-per-sample dataframe.

error_metricstr, optional

The error metric to extract. Default: “absolute_error_per_sample_ms”.

grouperstr or list of str, optional

The column(s) to group the data by. Default: “participant”.

Returns:
pandas.DataFrame

The error metric aggregated by group.

Raises:
ValidationError

If the grouper argument is not a string or a sequence of strings.