CohortFingerprint

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 CohortFingerprint(n_subjects: int, modalities: Tuple[str, ...], subject_id_digest: str, name: str | None = None, description: str | None = None)[source]

Bases: object

Non-identifiable description of the cohort behind a fitted model.

Sharing a habitat model without describing the cohort that defined it would be scientifically meaningless, but sharing subject identifiers would be unsafe. This type is the deliberate middle ground.

n_subjects

Number of subjects used for fitting.

Type:

int

modalities

Modality names consumed, in canonical order.

Type:

Tuple[str, …]

subject_id_digest

Salted digest of the ordered subject id list, which proves two runs used the same cohort without revealing identifiers.

Type:

str

name

Optional cohort label, e.g. "HCC-DCE-training".

Type:

str | None

description

Free-text description intended for a model card.

Type:

str | None

__init__(n_subjects: int, modalities: Tuple[str, ...], subject_id_digest: str, name: str | None = None, description: str | None = None) → None