two_step_habitat
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.
- two_step_habitat(*, modalities: Sequence[str], n_supervoxels: int = 50, n_habitats: int | str = 'auto', habitat_features: Sequence[str | Spec | Mapping[str, object]] | None = None, random_seed: int | None = None, supervoxel_algorithm: str = 'kmeans', habitat_fitter_algorithm: str = 'kmeans', roi: str = 'tumor') Study[source]
Declare a classical two-step habitat study.
- Parameters:
modalities – Modality names for the raw voxel extractor.
n_supervoxels – Number of supervoxels per subject.
n_habitats – Fixed habitat count or
"auto"with elbow search.habitat_features – Optional habitat feature families (
"msi", etc.).random_seed – Seed for every seedable component.
supervoxel_algorithm – Registered supervoxelizer name.
habitat_fitter_algorithm – Registered cohort fitter name.
roi – ROI keyword for voxel extraction.
- Returns:
A
Studyready forStudy.fit().
See also
habit.recipes.StudySklearn-style fit / fit_predict / predict entry.
habit.spec.HabitatSpecFrozen analysis declaration the factory builds.
habit.recipes.one_step_habitatPer-subject habitat definition.
habit.recipes.direct_pooling_habitatCohort clustering on voxel features.