CustomErrorAggregations#
- class mobgap.pipeline.evaluation.CustomErrorAggregations[source]#
Custom aggregation functions that might be useful in addition to the once provided by pandas (e.g. mean/std).
The functions are designed to work in combination with the
apply_aggregations.- Attributes:
Methods
icc([reference_col_name, detected_col_name])Calculate the intraclass correlation coefficient (ICC) for the detected and reference values.
loa([agreement])Calculate the limits of agreement of a measure.
quantiles([lower, upper])Calculate the quantiles of a measure.
n_datapoints
- __init__(*args, **kwargs)#
- icc( ) tuple[float, float][source]#
Calculate the intraclass correlation coefficient (ICC) for the detected and reference values.
- Parameters:
- df
The DataFrame containing the reference and detected values.
- reference_col_name
The identifier of the column containing the reference values.
- detected_col_name
The identifier of the column containing the detected values.
- Returns:
- icc, ci95
A tuple containing the intraclass correlation coefficient (ICC) as first item and the lower and upper bound of its 95% confidence interval (CI95%) as second item.
- loa(agreement: float = 1.96) tuple[float, float][source]#
Calculate the limits of agreement of a measure.
- Parameters:
- series
The Series containing the data column of interest.
- agreement
The agreement level for the limits of agreement.
- Returns:
- loa
The lower and upper limits of agreement as a tuple.