precision_panel

Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

precision_panel(conditions: Mapping[str, VoxelFeatureField], *, agreement: str = 'absolute', alpha: float = 0.05, scale: bool = True, min_voxels: int = 10, pair_mode: Literal['common_index', 'prior_pad'] = 'common_index', round_decimals: int | None = None) → DataFrame[source]

Compute the per-feature ICC panel of ONE subject under ONE experiment.

Parameters:
  • conditions – Condition name to voxel feature field of the same subject (e.g. {"original": f0, "perturbed": f1}, or {"R1": f1, "R3": f3}); at least two.

  • agreement – "absolute" for ICC(3A,1) (repeatability across replications of the same condition) or "consistency" for ICC(3C,1) (reproducibility across changing conditions).

  • alpha – Two-sided significance level of the confidence limits.

  • scale – Min-max scale every feature per condition before the ICC (the paper’s preprocessing).

  • min_voxels – Minimum number of paired, NaN-free voxels; features below it are reported as NaN (unmeasurable, fails the screen).

  • pair_mode – "common_index" joins on shared voxel coordinates and drops pairwise-incomplete rows. "prior_pad" drops NaNs independently per condition and pads the shorter vector with zeros (Prior GitHub metrics_repeat.py).

  • round_decimals – If set, round value / lcl / ucl to this many decimals after the ICC (their scripts use 3). None keeps full precision.

Returns:

DataFrame indexed by feature name with columns value, lcl, ucl and n_voxels.

Raises:

HABITAPIError – For fewer than two conditions, an unknown agreement flavour or pair mode, misaligned inputs, or no shared voxels.

Examples using habit.precision.precision_panel

Precise voxel features

Precise voxel features