mobgap.pipeline.evaluation.icc#
- mobgap.pipeline.evaluation.icc(
- df: DataFrame,
- reference_col_name: str = 'reference',
- detected_col_name: str = 'detected',
- *,
- icc_type: str = 'icc2',
- nan_policy: Literal['raise', 'omit'] = 'raise',
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.
- icc_type
The type of the ICC. Can be one of “icc1”, “icc2”, “icc3”, “icc1k”, “icc2k”, “icc3k”. See the documentation of the
pingouin.intraclass_corrfunction for more information. Default is “icc2”, often also referred to as ICC(2,1).- nan_policy
How to handle NaN values. Can be one of “raise” (error is raised), or “omit” (NaN values are ignored). Default is “raise”.
- 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.
Notes
Note, that in case of ICC2, the confidence interval is reported as [np.nan, np.nan] if the ICC is 1 or 0 (aka perfect agreement or disagreement) as the confidence interval is not defined in this case. Other implementations might return [1, 1] in this case.