habit.report: run-scoped persistence and figures

Run-scoped persistence and figures, declared as Python objects.

This package is the API counterpart of a habitat study’s presentation: construct a Report, pass it to fit_predict(), and each completed subject is persisted and drawn before the next one accumulates in memory.

It is deliberately not part of HabitatSpec.

User guide: Habitat Guide Volume and fractions · Python API guide (v2.0).

Pass a Report to fit_predict(). This is not part of HabitatSpec and does not enter scientific fingerprints. figure_layout is "flat" or "by_subject" (FIGURE_LAYOUTS).

Classes

Report

What to leave on disk and what to keep in memory for one study run.

FigureAtom

One drawable, persistable figure.

SubjectContext

Parent-process view of one completed subject.

Overlay

Habitat labels over one source modality.

VolumeFractions

Bar chart of per-habitat volume fractions of the non-background VOI.

MSI

Spatial-interaction (MSI) heatmap for the subject's habitat map.

ITH

ITH summary (global score plus optional per-habitat dispersion).

ClusterValidation

Auto-K / elbow / BIC curves from the subject's selection_report.

GraphSlice

Representative-slice habitat map with the node lattice overlaid.

GraphNetwork2D

Intra- and inter-habitat 2D network on the representative slice.

Functions

coerce_report

Build or complete a Report from the Study call-site kwargs.