PreciseFeatureSet
Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.
- class PreciseFeatureSet(feature_names: Tuple[str, ...], lcl_threshold: float, experiments: Tuple[str, ...], panels: Mapping[str, DataFrame], provenance: Provenance)[source]
Bases:
objectVoxel features that passed the precision screen, with the evidence.
- lcl_threshold
Lower-confidence-limit cutoff every selected feature cleared in every experiment (unless expert-included).
- Type:
- panels
Cohort-level ICC panel per experiment (index: feature; columns:
value,lcl,ucl,n_voxels).- Type:
Mapping[str, pandas.core.frame.DataFrame]
- provenance
How this selection was produced.
- preprocessor() Any[source]
Return the feature whitelist restricting a habitat run to these features.
Drop the returned component into a spec’s
voxel_feature_preprocessorschain (or use its.specin a YAML-facing payload) and the habitat computation clusters exactly the precise features – the Prior et al. 2024 workflow.- Returns:
A
FeatureWhitelistoverfeature_names.
- to_frame() DataFrame[source]
Return the long-format evidence table.
- Returns:
One row per experiment per feature, with columns
experiment,feature,value,lcl,ucl,n_voxelsandprecise.
- save(path: str | Path) Path[source]
Serialise to one self-describing JSON file.
- Parameters:
path – Destination file; the parent directory must exist.
- Returns:
The path written.
- classmethod load(path: str | Path) PreciseFeatureSet[source]
Load a serialised precise feature set.
- Parameters:
path – File written by
save().- Returns:
The reconstructed artefact.
- Raises:
HABITAPIError – If the file is not a PreciseFeatureSet serialisation.