plot_feature_preprocessing_chain
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.
- plot_feature_preprocessing_chain(steps: Sequence[str], image: object | None = None, labels: object | None = None, *, title: str = 'Feature preprocessing', panel_title: str = 'Habitats after the chain', crop_pad: int = 8) Figure[source]
Diagram of the clustering-feature preprocessing chain.
- Parameters:
steps – Step names in pipeline order, e.g.
("raw", "winsorize", "minmax", "zscore", "binning").image – Optional anatomy volume; with
labelsthe right-hand panel shows the cropped habitat map produced after the chain.labels – Optional habitat label map (array or
HabitatMap).title – Figure title (ASCII-sanitised).
panel_title – Title of the cropped data panel.
crop_pad – Context voxels around the habitat bounding box (default
8).
- Returns:
the chain of step boxes, an arrow, and – when
imageandlabelsare given – the resulting habitats.- Return type:
A matplotlib
Figure- Raises:
HABITAPIError – When
stepsis empty or only one ofimage/labelsis given.