Plugin introspection API
Stable HABIT plugin discovery and inspection API.
Implementation lives in habit.plugins.catalog. For v2 built-in
components, prefer plugin_catalog() or
constructor_signature().
User guide: Habitat Spec component catalog · Component registry.
Discover built-in and entry-point components. Parameter order is always
(name, domain).
Classes
Describe one component registered in a HABIT plugin domain. |
|
One |
|
One catalog row derived from the constructor contract (not a hand-copied table). |
|
Report loaded external entry points and non-fatal discovery failures. |
Functions
List registered HABIT extension components without exposing core registries. |
|
Return metadata for one registered component or raise a clear API error. |
|
Return a legacy Pydantic |
|
Build a live catalog from each plugin's constructor contract. |
|
Render |
|
Load external HABIT plugins declared through standard Python entry points. |
Setup a logger for a HABIT module or script. |
|
Return whether an optional third-party module can be imported. |
|
Return HABIT and key dependency versions for reproducibility and debugging. |
|
Return whether |
from habit.plugins import get_plugin_info, list_plugins, load_plugins
from habit.supervoxel import SlicSupervoxelizer, SupervoxelizerRegistry
report = load_plugins(strict=False)
print(report.loaded, report.failures)
all_plugins = list_plugins()
habitat_only = list_plugins("habitat_model_fitter")
info = get_plugin_info("slic", "supervoxelizer")
print(info.name, info.domain, info.implementation, info.provider)
# Parameters live on the component constructor, not a Params model.
print(SupervoxelizerRegistry.available())
print(SupervoxelizerRegistry.constructor_signature("slic"))
slic = SupervoxelizerRegistry.create("slic", n_supervoxels=50)
slic = SlicSupervoxelizer(n_supervoxels=50)
load_plugins resilience
strict=False(default) — broken entry points are recorded inPluginLoadReport.failuresand logged as warnings; discovery continuesstrict=True— the first load error is re-raised immediately
report = load_plugins(strict=False)
if report.failures:
for name, message in report.failures.items():
print("plugin failure:", name, message)
# CI / production gate: abort if any third-party plugin is broken
load_plugins(strict=True)
Legacy plural domains (e.g. habitat_features, models) still resolve
but emit HabitDeprecationWarning; prefer the v1 singular domains below.
v1 protocol domains
Use these domain strings with list_plugins / get_plugin_info:
V1_DOMAINS = [
"voxel_feature_extractor",
"supervoxelizer",
"supervoxel_feature_extractor",
"habitat_model_fitter",
"habitat_assigner",
"habitat_feature_extractor",
"combiner",
"image_perturbation",
"preprocessor",
"table_preprocessor",
"feature_selector",
"classifier",
"metric",
]
for domain in V1_DOMAINS:
print(domain, [p.name for p in list_plugins(domain)])
Enumerate registered names:
for plugin in list_plugins():
print(plugin.domain, plugin.name)
Which Spec / create names exist
The component __init__ is the only parameter contract: types, defaults,
allowed values or ranges, validation, and same-named public attributes.
Registry.create("name", **kwargs) forwards those constructor
arguments. Do not copy parameter tables into YAML or notebooks — they
rot. Look names up with list_plugins / Registry.available(), and
read the constructor (or Registry.constructor_signature) for
parameters.
from habit.plugins import list_plugins
from habit.table_preprocessing import TablePreprocessorRegistry
print([info.name for info in list_plugins("table_preprocessor")])
print(TablePreprocessorRegistry.constructor_signature("minmax"))
scaler = TablePreprocessorRegistry.create("minmax")
A bad name on Registry.create / get_plugin_info lists the names
that are registered in that domain.
Live catalog
Each entry is one line of purpose, required vs optional constructor
parameters, one Spec / Registry.create example, and a
parameter table (default, allowed values / type, meaning). YAML
name: / params: blocks use the same constructor names.
Habitat stages organised by scientific module: Habitat Spec component catalog.
voxel_feature_extractor
- concat
Join several voxel feature families side by side for the same voxels. Required:
extractors. Optional:roi, modalities, expression.Spec("concat", {"extractors": ...})Registry.create("concat", extractors=...)Param
Default
Allowed / type
Meaning
extractors(required)Sequence
Child specifications as
{"name": ..., "params": {...}}mappings, resolved through the voxel-feature registry in the given order. A child’s ownroiis overridden by this operator’s.roiNonestr | None
Mask key defining the region of interest for every child;
Noneuses the subject’s single mask.modalities()Sequence
Accepted for configuration compatibility and ignored; each child names the modalities it reads.
expressionNonestr | None
The original v0 method expression, carried for provenance when this extractor was reached by config translation.
- expression
Per-voxel features defined by restricted arithmetic expressions. Required:
(none). Optional:features, expressions, feature_names, modalities, roi, eps.Spec("expression")Registry.create("expression")Param
Default
Allowed / type
Meaning
featuresNoneMapping | None
Mapping of feature name to formula. Mutually exclusive with
expressions.expressionsNoneSequence | None
Ordered formulas when names are not provided up front.
feature_namesNoneSequence | None
Names aligned with
expressions; defaults toexpr_0,expr_1, …modalities()Sequence
Optional explicit modality list. When empty, modality names are inferred from identifiers used in the formulas (excluding builtins and function names).
roiNonestr | None
Mask key;
Noneuses the subject’s single mask.eps1e-08float
Value bound to the name
epsinside every formula.- kinetic
Per-voxel enhancement slopes across a dynamic contrast series. Required:
timestamps. Optional:phases, roi, time_format, modalities, expression.Spec("kinetic", {"timestamps": ...})Registry.create("kinetic", timestamps=...)Param
Default
Allowed / type
Meaning
timestamps(required)str | Mapping
Acquisition times per subject, either as a mapping
{subject_id: {phase: "HH-MM-SS"}}for API callers, or a path to the v0.1 timestamp table.phases('pre_contrast', 'LAP', 'PVP', 'delay_3min')Sequence
Modality keys of the series in acquisition order: unenhanced, arterial, portal-venous, delayed.
roiNonestr | None
Mask key defining the region of interest;
Noneuses the subject’s single mask.time_format'%H-%M-%S'str
strptimeformat of the timestamp values.modalities()Sequence
Accepted for configuration compatibility and ignored;
phasesdefines which images are read, because the four phases have fixed roles that a flat list cannot express.expressionNonestr | None
The original v0 method expression, carried for provenance when this extractor was reached by config translation.
- local_entropy
Shannon entropy of each voxel’s intensity neighbourhood. Required:
(none). Optional:modalities, roi, kernel_size, bins, modality, as_.Spec("local_entropy")Registry.create("local_entropy")Param
Default
Allowed / type
Meaning
modalities()Sequence
Modality keys to describe, in feature order; empty selects every image the subject carries.
roiNonestr | None
Mask key defining the region of interest;
Noneuses the subject’s single mask.kernel_size3int
Neighbourhood edge length in voxels. Even values are incremented to keep the neighbourhood centred, as in v0.1.
bins32int
Histogram bins used to discretise intensities.
modalityNonestr | None
Single modality key – the explicit form used inside feature trees. Mutually exclusive with
modalities.as_Nonestr | None
Optional output-column alias. Valid only with exactly one resolved modality; the column suffix then uses the alias.
- raw
Per-voxel raw intensity of every requested modality inside the ROI. Required:
(none). Optional:modalities, roi, modality, as_.Spec("raw")Registry.create("raw")Param
Default
Allowed / type
Meaning
modalities()Sequence
Modality keys to read from the subject, in feature order – the historical convenience that stacks several modalities into one node without a
concatcombiner.roiNonestr | None
Mask key defining the region of interest;
Noneuses the subject’s single mask.modalityNonestr | None
Single modality key – the explicit form used inside feature trees (
raw("T1")). Mutually exclusive withmodalities.as_Nonestr | None
Optional output-column alias. Valid only with exactly one resolved modality; the column is then named after the alias instead of the modality.
- voxel_radiomics
Describe every ROI voxel by a PyRadiomics feature vector. Required:
(none). Optional:modalities, roi, params_file, params, kernel_radius, voxel_batch, use_torch_radiomics, torch_device, torch_dtype, use_gpu_matrices, output_float32, class_progress, crop_to_roi, cache_dir, modality, as_.Spec("voxel_radiomics")Registry.create("voxel_radiomics")Param
Default
Allowed / type
Meaning
modalities()Sequence
Modality keys to extract from, in feature order; empty selects every image the subject carries.
roiNonestr | None
Mask key defining the region of interest;
Noneuses the subject’s single mask.params_fileNonestr | None
Path to a PyRadiomics parameter YAML;
Noneselects the bundled voxel preset.paramsNonedict | None
Inline PyRadiomics settings, for API callers holding settings in memory. Mutually exclusive with
params_file.kernel_radius3int
Neighbourhood radius in voxels; radius 1 is a 3x3x3 cube, radius 3 a 7x7x7 cube.
voxel_batch1000int | str
ROI voxels per batch. Default 1000. Pass a larger integer on a 12–24 GB GPU, or
"auto"to pick from VRAM.use_torch_radiomics'auto'str | bool
"auto",TrueorFalse– whether to use the TorchRadiomics path when torch and CUDA are present.torch_device'auto'str
Torch device string, or
"auto"to select one.torch_dtype'float64'str
"float64"(default) or"float32"for the torch path.use_gpu_matrices'auto'str | bool
"auto",TrueorFalse– whether the TorchRadiomics texture matrices (GLCM, …) are built on GPU byhabit.kernels.radiomics.gpumatricesinstead of the single-threaded PyRadiomics C extension."auto"follows the torch device. Bit-identical counts either way.output_float32Truebool
Downcast the feature columns to float32, the v0.1 default that keeps large voxel tables manageable.
class_progressFalsebool
When True, print and tqdm each PyRadiomics class (firstorder, glcm, …). Default False: one
execute()with no per-class lines;Cohort.mapstill shows subject progress.crop_to_roiTruebool
When True (default), crop image and mask to the ROI bounding box plus
kernel_radiuspadding before callingexecute. PyRadiomics re-applies the identical crop internally, so feature values are bit-identical; the pre-crop just keeps the full-volume diagnostics (sitk.Hash, whole-image statistics) and mask checks off the big volume, saving several seconds per modality on whole-body scans.cache_dirNonestr | None
Optional directory for extracted fields. A hit skips PyRadiomics. The cache key ignores
voxel_batchand device knobs so a later run with a larger batch can reuse the file.modalityNonestr | None
Single modality key – the explicit form used inside feature trees. Mutually exclusive with
modalities.as_Nonestr | None
Optional output-column alias. Valid only with exactly one resolved modality; the column suffix then uses the alias.
supervoxelizer
- gmm
Partition the ROI by a Gaussian mixture over voxel features. Required:
(none). Optional:n_supervoxels, max_iter, n_init, covariance_type.Spec("gmm")Registry.create("gmm")Param
Default
Allowed / type
Meaning
n_supervoxels50int
Requested number of supervoxels, clamped to the ROI voxel count.
max_iter300int
Maximum EM iterations.
n_init10int
Number of EM restarts.
covariance_type'full'str
scikit-learn covariance parameterisation (
"full","tied","diag","spherical").- kmeans
Partition the ROI by k-means over voxel features. Required:
(none). Optional:n_supervoxels, max_iter, n_init.Spec("kmeans")Registry.create("kmeans")Param
Default
Allowed / type
Meaning
n_supervoxels50int
Requested number of supervoxels, clamped to the ROI voxel count.
max_iter300int
Maximum k-means iterations per restart.
n_init10int
Number of k-means restarts.
- slic
Partition the ROI into SLIC supervoxels and average features within each. Required:
(none). Optional:n_supervoxels, compactness, enforce_connectivity, estimator_params.Spec("slic")Registry.create("slic")Param
Default
Allowed / type
Meaning
n_supervoxels100int
Requested number of supervoxels. Clamped to the number of ROI voxels (a partition cannot have more non-empty regions than voxels).
compactness10.0float
Balance between colour similarity and spatial proximity (
skimage.segmentation.slicsemantics).enforce_connectivityTruebool
When
True, disconnected segments are relabelled so every supervoxel is connected.estimator_paramsNoneMapping | None
Extra keyword arguments forwarded verbatim to
skimage.segmentation.slic(e.g.{"sigma": 1.0}), for vendor parameters HABIT does not declare. Keys colliding with a declared parameter or with a call argument HABIT controls (n_segments,mask,channel_axis,start_label) are rejected, and every key is validated against the vendor signature at call time: a key recorded in the spec fingerprint must reach the vendor function, never be silently dropped.
supervoxel_feature_extractor
- mean
Average the voxel signal within each supervoxel, one modality at a time. Required:
(none). Optional:modality, source, as_.Spec("mean")Registry.create("mean")Param
Default
Allowed / type
Meaning
modalityNonestr | None
See the component docstring.
source'working'str
See the component docstring.
as_Nonestr | None
See the component docstring.
- mean_voxel_features
Describe each supervoxel by the mean of the voxel features within it. Required:
(none). Optional:field.Spec("mean_voxel_features")Registry.create("mean_voxel_features")Param
Default
Allowed / type
Meaning
fieldNoneVoxelFeatureField | None
Voxel features to aggregate. Optional; see above.
- percentile
A percentile of the voxel signal within each supervoxel. Required:
(none). Optional:modality, source, q, as_.Spec("percentile")Registry.create("percentile")Param
Default
Allowed / type
Meaning
modalityNonestr | None
See the component docstring.
source'working'str
See the component docstring.
q90.0float
See the component docstring.
as_Nonestr | None
See the component docstring.
- std
Sample standard deviation of the voxel signal within each supervoxel. Required:
(none). Optional:modality, source, as_.Spec("std")Registry.create("std")Param
Default
Allowed / type
Meaning
modalityNonestr | None
See the component docstring.
source'working'str
See the component docstring.
as_Nonestr | None
See the component docstring.
- supervoxel_radiomics
Describe each supervoxel by PyRadiomics features of the original images. Required:
(none). Optional:modality, modalities, as_, params_file, params, supervoxel_batch, supervoxel_union_bbox_crop, supervoxel_pad_distance, use_supervoxel_cext, union_bin, use_torch_radiomics, torch_device, torch_dtype, output_float32.Spec("supervoxel_radiomics")Registry.create("supervoxel_radiomics")Param
Default
Allowed / type
Meaning
modalityNonestr | None
Single modality name; mutually exclusive with
modalities.modalities()Sequence
Modality names to extract from; empty selects all the subject carries.
as_Nonestr | None
Alias used as the column suffix instead of the modality name; requires
modality.params_fileNonestr | None
Path to a PyRadiomics parameter YAML, or
Nonefor PyRadiomics defaults.paramsNonedict | None
Inline PyRadiomics settings mapping, for API users holding settings in memory. Mutually exclusive with
params_file.supervoxel_batch64int
Labels processed per batch. Larger batches trade memory for speed and never change the numbers.
supervoxel_union_bbox_cropTruebool
Crop image and masks to the bounding box of the union of all supervoxels before extraction.
supervoxel_pad_distanceNoneint | None
Padding around that bounding box;
Nonekeeps the PyRadiomicspadDistancesetting.use_supervoxel_cextTruestr | bool
True(default),"auto", orFalse– whether to use the habit native C extension for texture matrices.union_binFalsebool
When False (default) each supervoxel is discretized with its own
binWidthedges, matching PyRadiomicsexecute(). When True, all labels share one union-mask bin.use_torch_radiomics'auto'str | bool
"auto",TrueorFalse– whether to use the TorchRadiomics GPU path when torch and CUDA are present.torch_device'auto'str
Torch device string, or
"auto"to select one.torch_dtype'float64'str
"float64"(default) or"float32"for the torch path.output_float32Truebool
Downcast the resulting feature columns to float32, the v0.1 default that keeps large supervoxel tables manageable.
feature_preprocessing_method
- binning
Discretise features into ordinal bin indices. Required:
(none). Optional:n_bins, bin_strategy, across_features.Spec("binning")Registry.create("binning")Param
Default
Allowed / type
Meaning
n_bins10int
Number of bins.
bin_strategy'uniform'str
uniform,quantileorkmeans.across_featuresFalsebool
Learn one set of edges from the pooled values.
- correlation_filter
Greedily drop redundant, highly correlated feature columns. Required:
(none). Optional:corr_threshold, corr_method.Spec("correlation_filter")Registry.create("correlation_filter")Param
Default
Allowed / type
Meaning
corr_threshold0.95float
Absolute-correlation cut-off above which later columns are dropped.
corr_method'spearman'str
pearson,spearmanorkendall.- feature_whitelist
Restrict the feature matrix to an explicit, externally derived list. Required:
features. Optional:(none).Spec("feature_whitelist", {"features": ...})Registry.create("feature_whitelist", features=...)Param
Default
Allowed / type
Meaning
features(required)Sequence
Feature names to keep, in output order. At least one is required, and every name must be present in the matrix – a missing feature breaks the “same features” contract and raises rather than being silently dropped.
- impute
Replace non-finite feature values with a learned per-column statistic. Required:
(none). Optional:strategy.Spec("impute")Registry.create("impute")Param
Default
Allowed / type
Meaning
strategy'mean'str
meanormedianof each column’s finite values, orzero. Columns with no finite value at all impute to 0.0 regardless, so one unusable modality cannot invalidate a subject.- l2
Scale each row (voxel / supervoxel) to unit Euclidean length. Required:
(none). Optional:(none).Spec("l2")Registry.create("l2")- log
Compress right-skewed features with
log(x - min + 1). Required:(none). Optional:across_features.Spec("log")Registry.create("log")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- maxabs
Scale features by the maximum absolute value. Required:
(none). Optional:across_features.Spec("maxabs")Registry.create("maxabs")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- minmax
Scale features to [0, 1]. Required:
(none). Optional:across_features.Spec("minmax")Registry.create("minmax")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- precise_correlation_filter
Prior 2024 Spearman screen: signed r, p-value, keep the later column. Required:
(none). Optional:corr_threshold, p_threshold.Spec("precise_correlation_filter")Registry.create("precise_correlation_filter")Param
Default
Allowed / type
Meaning
corr_threshold0.7float
Signed Spearman cut-off; drop when r is greater.
p_threshold0.05float
Spearman p-value cut-off; drop only when p is smaller.
- quantile
Map each feature onto a uniform or normal distribution by percentile rank. Required:
(none). Optional:across_features, n_quantiles, output_distribution.Spec("quantile")Registry.create("quantile")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
n_quantiles1000int
See the component docstring.
output_distribution'uniform'str
See the component docstring.
- robust
Centre features on the median and scale by the interquartile range. Required:
(none). Optional:across_features.Spec("robust")Registry.create("robust")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- variance_filter
Drop feature columns whose variance is at or below a threshold. Required:
(none). Optional:variance_threshold.Spec("variance_filter")Registry.create("variance_filter")Param
Default
Allowed / type
Meaning
variance_threshold0.0float
Columns with
var <= thresholdare dropped;0.0removes only constant columns.- winsorize
Clip extreme values at tail quantiles instead of discarding them. Required:
(none). Optional:winsor_limits, across_features.Spec("winsorize")Registry.create("winsorize")Param
Default
Allowed / type
Meaning
winsor_limits(0.05, 0.05)tuple[float, float]
Lower and upper tail fractions to clip, each in
[0, 0.5).across_featuresFalsebool
Pool statistics across feature columns.
- zscore
Standardise features to zero mean and unit variance. Required:
(none). Optional:across_features.Spec("zscore")Registry.create("zscore")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
habitat_model_fitter
- gmm
Learn population habitats by a Gaussian mixture over pooled features. Required:
(none). Optional:n_habitats, min_habitats, max_habitats, validation, covariance_type, n_init, max_iter.Spec("gmm")Registry.create("gmm")Param
Default
Allowed / type
Meaning
n_habitatsNoneint | None
Fixed habitat count, or
Noneto select it byvalidation.min_habitats2int
Smallest candidate count during selection.
max_habitats10int
Largest candidate count during selection.
validation'bic'str | Sequence
Selection criterion, or a list of criteria that each cast one vote:
"bic"/"aic"/"davies_bouldin"(minimise),"bic_elbow"(Prior 2024 BIC-slope elbow, not minimum BIC), or"silhouette"/"calinski_harabasz"/"gap"(maximise).covariance_type'full'str
GaussianMixture covariance structure.
n_init50int
Number of mixture initialisations per candidate count; the best-likelihood run is kept (sklearn
n_init).max_iter100int
EM iteration limit per candidate count.
- kmeans
Learn population habitats by k-means over pooled supervoxel features. Required:
(none). Optional:n_habitats, min_habitats, max_habitats, validation, n_init, max_iter.Spec("kmeans")Registry.create("kmeans")Param
Default
Allowed / type
Meaning
n_habitatsNoneint | None
Fixed habitat count, or
Noneto select it byvalidation.min_habitats2int
Smallest candidate count during selection.
max_habitats10int
Largest candidate count during selection.
validation'elbow'str | Sequence
Selection criterion, or a list of criteria that each cast one vote:
"elbow"/"kneedle"/"inertia"(Kneedle knee of the inertia curve; default"elbow"),"silhouette"/"calinski_harabasz"/"gap"(maximise), or"davies_bouldin"(minimise). Since v1.0elbowis an alias ofkneedle; seehabit.kernels.cluster_selection. The default is the community-used inertia elbow overmin_habitats=2..max_habitats=10.n_init50int
k-means restarts per candidate count.
max_iter300int
Maximum k-means iterations per fit. Defaults to the scikit-learn default (300), which is also the value the v0.1 configuration schema recorded.
habitat_assigner
- nearest_centroid
Assign each supervoxel to the habitat of its nearest centroid. Required:
model. Optional:(none).Spec("nearest_centroid", {"model": ...})Registry.create("nearest_centroid", model=...)Param
Default
Allowed / type
Meaning
model(required)HabitatModel
The fitted habitat definition to project.
habitat_feature_extractor
- each_habitat
PyRadiomics features of the raw image(s) within each habitat label. Required:
(none). Optional:params_file, params, modalities, modality, as_, use_torch_radiomics, torch_device, torch_dtype.Spec("each_habitat")Registry.create("each_habitat")Param
Default
Allowed / type
Meaning
params_fileNonestr | None
See the component docstring.
paramsNonedict | None
See the component docstring.
modalitiesNoneSequence | None
See the component docstring.
modalityNonestr | None
See the component docstring.
as_Nonestr | None
See the component docstring.
use_torch_radiomicsFalsestr | bool
See the component docstring.
torch_device'auto'str
See the component docstring.
torch_dtype'float64'str
See the component docstring.
- graph
Graph-topology features of one subject’s habitat map. Required:
(none). Optional:include_single_habitat_graph, include_pairwise_habitat_graph, edge_method, distance_threshold, adjacency_connectivity, adjacency_min_voxels, edge_weight, min_region_voxels, connectivity, erosion_radius, node_method, subdivide_region_voxels, block_size, block_min_coverage, pairwise_include_intra_edges, include_extended_metrics, extended_min_nodes, small_world_nrand, small_world_niter, rich_club_q, graph_null_sampler, graph_null_device.Spec("graph")Registry.create("graph")Param
Default
Allowed / type
Meaning
include_single_habitat_graphTruebool
See the component docstring.
include_pairwise_habitat_graphTruebool
See the component docstring.
edge_method'min_distance'‘centroid_distance’ | ‘adjacency’ | ‘min_distance’
See the component docstring.
distance_threshold5.0float
See the component docstring.
adjacency_connectivity'corner'‘face’ | ‘edge’ | ‘corner’
See the component docstring.
adjacency_min_voxels10int
See the component docstring.
edge_weight'none'‘none’ | ‘distance’ | ‘inverse_distance’ | ‘contact_voxels’
See the component docstring.
min_region_voxels1int
See the component docstring.
connectivity'full'‘face’ | ‘full’
See the component docstring.
erosion_radius0int
See the component docstring.
node_method'uniform_grid'‘uniform_grid’ | ‘component’
See the component docstring.
subdivide_region_voxels1000int
See the component docstring.
block_size8int
See the component docstring.
block_min_coverage0.2float
See the component docstring.
pairwise_include_intra_edgesTruebool
See the component docstring.
include_extended_metricsTruebool
See the component docstring.
extended_min_nodes10int
See the component docstring.
small_world_nrand100int
See the component docstring.
small_world_niter100int
See the component docstring.
rich_club_q100int
See the component docstring.
graph_null_sampler'analytic'‘analytic’ | ‘config’ | ‘rewire’
See the component docstring.
graph_null_device'auto'str
See the component docstring.
- ith_score
ITH score for one subject’s habitat map. Required:
(none). Optional:include_auxiliary.Spec("ith_score")Registry.create("ith_score")Param
Default
Allowed / type
Meaning
include_auxiliaryFalsebool
See the component docstring.
- msi
Multiregional spatial interaction features of one subject’s habitat map. Required:
(none). Optional:(none).Spec("msi")Registry.create("msi")- non_radiomics
Basic spatial features of one subject’s habitat map. Required:
(none). Optional:(none).Spec("non_radiomics")Registry.create("non_radiomics")- traditional
PyRadiomics features of the raw image(s) within the whole ROI. Required:
(none). Optional:params_file, params, modalities, modality, as_, use_torch_radiomics, torch_device, torch_dtype.Spec("traditional")Registry.create("traditional")Param
Default
Allowed / type
Meaning
params_fileNonestr | None
See the component docstring.
paramsNonedict | None
See the component docstring.
modalitiesNoneSequence | None
See the component docstring.
modalityNonestr | None
See the component docstring.
as_Nonestr | None
See the component docstring.
use_torch_radiomicsFalsestr | bool
See the component docstring.
torch_device'auto'str
See the component docstring.
torch_dtype'float64'str
See the component docstring.
- volume
Voxel counts and volume fractions of every habitat for one subject. Required:
(none). Optional:(none).Spec("volume")Registry.create("volume")- whole_habitat
PyRadiomics features of the habitat map treated as the image itself. Required:
(none). Optional:params_file, params, use_torch_radiomics, torch_device, torch_dtype.Spec("whole_habitat")Registry.create("whole_habitat")Param
Default
Allowed / type
Meaning
params_fileNonestr | None
See the component docstring.
paramsNonedict | None
See the component docstring.
use_torch_radiomicsFalsestr | bool
See the component docstring.
torch_device'auto'str
See the component docstring.
torch_dtype'float64'str
See the component docstring.
combiner
- average
Average sibling blocks element-wise, optionally with child weights. Required:
(none). Optional:weights.Spec("average")Registry.create("average")Param
Default
Allowed / type
Meaning
weightsNoneMapping | None
Weight per child source label. Weights are normalised to sum to one; children without an entry keep weight 1.0 (before normalisation).
- concat
Merge sibling blocks by placing their columns side by side. Required:
(none). Optional:(none).Spec("concat")Registry.create("concat")- difference
Element-wise difference of two sibling blocks:
first - second. Required:(none). Optional:(none).Spec("difference")Registry.create("difference")- expression
Features defined by restricted arithmetic over sibling block columns. Required:
(none). Optional:features, expressions, feature_names, eps.Spec("expression")Registry.create("expression")Param
Default
Allowed / type
Meaning
featuresNoneMapping | None
Mapping of feature name to formula. Mutually exclusive with
expressions.expressionsNoneSequence | None
Ordered formulas when names are not provided up front.
feature_namesNoneSequence | None
Names aligned with
expressions; defaults toexpr_0,expr_1, …eps1e-08float
Value bound to the name
epsinside every formula.- kinetic
Per-unit enhancement slopes across a dynamic contrast series. Required:
timestamps. Optional:phases, time_format.Spec("kinetic", {"timestamps": ...})Registry.create("kinetic", timestamps=...)Param
Default
Allowed / type
Meaning
timestamps(required)str | Mapping
Acquisition times per subject, either as a mapping
{subject_id: {phase: "HH-MM-SS"}}for API callers, or a path to the v0.1 timestamp table.phases()Sequence
Phase labels in acquisition order (unenhanced, arterial, portal-venous, delayed). Empty resolves to the merged child column names – for
rawchildren, their modality names.time_format'%H-%M-%S'str
strptimeformat of the timestamp values.- ratio
Element-wise ratio of two sibling blocks:
first / (second + eps). Required:(none). Optional:eps.Spec("ratio")Registry.create("ratio")Param
Default
Allowed / type
Meaning
eps1e-08float
Constant added to the denominator before dividing. Must be non-negative.
- weighted_concat
Concatenate sibling blocks after scaling each by a child-specific weight. Required:
(none). Optional:weights.Spec("weighted_concat")Registry.create("weighted_concat")Param
Default
Allowed / type
Meaning
weightsNoneMapping | None
Scale factor per child, keyed by the child’s source label (its
as_alias when set, else its modality). Children without an entry keep weight 1.0.
image_perturbation
- bspline_deform
MONAI elastic / B-spline free-form warp of every image and ROI. Required:
(none). Optional:sigma_range, magnitude_range, image_mode, mask_mode, padding_mode, device, target_dice, dice_tolerance, control_spacing, mask_only.Spec("bspline_deform")Registry.create("bspline_deform")Param
Default
Allowed / type
Meaning
sigma_range(1.5, 3.0)Sequence
Gaussian smoothing
(low, high)of the offset grid, in voxels. Wider sigma gives a smoother warp. Ignored whencontrol_spacingis set.magnitude_range(8.0, 12.0)Sequence
Displacement magnitude
(low, high)in voxels. Larger values wrinkle the ROI more.image_mode'bilinear'str | int
Intensity interpolator (
"bilinear"/"nearest"or spline order 0–5).mask_mode'nearest'str | int
ROI interpolator (
"nearest"recommended for the MONAI path;"bilinear"thenrintis a smoother iso-contour on the FFD path).padding_mode'reflection'str
Out-of-grid padding (
reflection,border, orzeros).device'cpu'str
Torch device (
"cpu"/"cuda"). Default"cpu"is the portable path; pass"cuda"when a GPU is available and the volume fits in memory. Unused on the FFD path.target_diceNonefloat | None
When set, scale one frozen offset field so the Dice between the original and warped ROI is within
dice_toleranceof this value.Nonekeeps the random magnitude frommagnitude_range.dice_tolerance0.02float
Allowed absolute error on
target_dice.control_spacingNonefloat | None
When set, voxels between neighbouring FFD control points (must be
> 1).Nonekeeps the MONAIRand3DElasticdpath.mask_onlyFalsebool
When
True, warp every ROI and leave images untouched (inter-observer contour wobble on a fixed scan). WhenFalse, image and mask share one field.- gaussian_noise
Add zero-mean Gaussian noise to every image of a subject. Required:
(none). Optional:sigma, noise_method, roi, round_to_int.Spec("gaussian_noise")Registry.create("gaussian_noise")Param
Default
Allowed / type
Meaning
sigmaNonefloat | None
Noise standard deviation in intensity units;
Noneestimates it per subject withnoise_method(the paper’s choice, MIRP’s behaviour when no level is configured).noise_method'chang'str
"chang"(wavelet estimator) or"roi_std"(standard deviation inside the ROI).roiNonestr | None
Mask key for
roi_stdestimation;Noneuses the subject’s single mask.round_to_intFalsebool
Round the noisy image to whole numbers, mirroring MIRP’s handling of integer-valued CT (HU) data.
- gradient_weighted
Locally grow/shrink ROI boundaries where image gradient is low. Required:
(none). Optional:modality, roi, max_radius_voxels, probability.Spec("gradient_weighted")Registry.create("gradient_weighted")Param
Default
Allowed / type
Meaning
modalityNonestr | None
Image modality supplying the gradient-magnitude map;
Noneuses the subject’s first image. The map is normalised to[0, 1]over the ROI bounding region.roiNonestr | None
Restrict the perturbation to one mask key;
Noneperturbs all masks.max_radius_voxels2int
Neighbourhood radius bounding each local flip.
probability0.5float
Base flip probability at zero gradient; effective probability is
probability * (1 - gradient).- morphological
Uniformly grow or shrink every ROI (MIRP
perturbation_roi_adapt_size). Required:(none). Optional:grow_mm, max_grow_mm, roi, connectivity.Spec("morphological")Registry.create("morphological")Param
Default
Allowed / type
Meaning
grow_mmNonefloat | None
Fixed physical radius in millimetres; positive dilates, negative erodes, zero is a no-op.
Nonesamples a signed radius fromUniform(-max_grow_mm, +max_grow_mm)per call.max_grow_mm1.0float
Sampling bound when
grow_mmis unset.roiNonestr | None
Restrict the perturbation to one mask key;
Noneperturbs all masks.connectivity1int
Structuring-element connectivity in
{1, 2, 3};1(6-connected) is the MIRP-like default.- rigid
Sub-voxel translation and small-angle rotation in ONE resample. Required:
(none). Optional:shift_voxels, shift_fraction, random_signs, angle_degrees, axis, interpolator, random_sign, warp_masks.Spec("rigid")Registry.create("rigid")Param
Default
Allowed / type
Meaning
shift_voxelsNoneSequence | None
Fixed voxel shift;
Noneusesshift_fraction.shift_fraction0.5float
MIRP
perturbation_translation_fractionin[0, 1](paper-style default 0.5).random_signsTruebool
Randomize the sign of each translation axis.
angle_degrees0.5float
In-plane rotation in degrees (paper: 0.5).
axis'z'str
Rotation axis (paper:
"z").interpolator'bspline'str
Intensity interpolator (paper:
"bspline").random_signFalsebool
Randomize the rotation sense.
warp_masksTruebool
When True, apply the same rigid move to every ROI. Prior 2024 extraction keeps the original mask (False).
- rotation
Rotate image content by a small fixed angle about the image centre. Required:
(none). Optional:angle_degrees, axis, interpolator, random_sign, warp_masks.Spec("rotation")Registry.create("rotation")Param
Default
Allowed / type
Meaning
angle_degrees0.5float
Rotation angle in degrees; the paper uses
0.5. Deterministic by design – pass the sign you want.axis'z'str
Axis to rotate around (
"x","y"or"z";"z"is the axial in-plane axis, the paper’s choice).interpolator'bspline'str
Interpolator for the intensity images (
"bspline"is the paper’s choice); masks use nearest neighbour only whenwarp_masksis True.random_signFalsebool
When
True, the sign ofangle_degreesis drawn as±1per call (some MIRP configs randomize the sense of the 0.5° in-plane rotation). The paper’s default is a fixed+0.5degrees, so this staysFalse.warp_masksTruebool
When True, apply the same rotation to every ROI. Prior 2024 extraction keeps the original mask (False).
- slice_extent
Add or remove whole axial slices at the superior/inferior ROI ends. Required:
(none). Optional:grow_slices, shrink_slices, max_slices, roi.Spec("slice_extent")Registry.create("slice_extent")Param
Default
Allowed / type
Meaning
grow_slices0int
Slices to append at each occupied end (copy of the nearest occupied slice’s labels).
shrink_slices0int
Occupied slices to remove at each end.
max_slices0int
Bound for random per-end counts;
0uses the fixed counts.roiNonestr | None
Restrict the perturbation to one mask key;
Noneperturbs all masks.- translation
Translate image content by a (random) sub-voxel shift. Required:
(none). Optional:shift_voxels, max_shift_voxels, interpolator, shift_fraction, random_signs, warp_masks.Spec("translation")Registry.create("translation")Param
Default
Allowed / type
Meaning
shift_voxelsNoneSequence | None
Fixed shift in voxel units, SimpleITK
(x, y, z)order;Nonedefers toshift_fractionor random sampling.max_shift_voxels1.0float
Sampling bound when neither fixed shift is set.
interpolator'bspline'str
Interpolator for the intensity images (
"bspline"is the paper’s choice); masks use nearest neighbour only whenwarp_masksis True.shift_fractionNonefloat | None
MIRP-style fraction of a voxel in
[0, 1]. When set (andshift_voxelsis unset), the shift is±fractionon each axis (signs random ifrandom_signs).random_signsTruebool
When using
shift_fraction, randomize the sign of each axis (MIRP interpolates at a shifted grid; the direction of the shift is not anatomically privileged).warp_masksTruebool
When True, apply the same translation to every ROI. Prior 2024 extraction keeps the original mask (False).
pooling
- pool
Marker component that declares the subject→cohort fan-in watershed. Required:
(none). Optional:(none).Spec("pool")Registry.create("pool")
preprocessor
- adaptive_histogram_equalization
Contrast-limited adaptive histogram equalization (SimpleITK). Required:
(none). Optional:alpha, beta, radius.Spec("adaptive_histogram_equalization")Registry.create("adaptive_histogram_equalization")Param
Default
Allowed / type
Meaning
alpha0.3float
See the component docstring.
beta0.3float
See the component docstring.
radius5int | tuple[int, int, int]
See the component docstring.
- histogram_standardization
Nyúl histogram standardization onto a standard intensity scale. Required:
(none). Optional:percentiles, target_min, target_max, mask_key.Spec("histogram_standardization")Registry.create("histogram_standardization")Param
Default
Allowed / type
Meaning
percentilesNonelist[float] | None
See the component docstring.
target_min0.0float
See the component docstring.
target_max100.0float
See the component docstring.
mask_keyNonestr | None
See the component docstring.
- n4_correction
N4 bias-field correction (SimpleITK). Required:
(none). Optional:num_fitting_levels, num_iterations, convergence_threshold, shrink_factor, mask_name.Spec("n4_correction")Registry.create("n4_correction")Param
Default
Allowed / type
Meaning
num_fitting_levels4int
See the component docstring.
num_iterationsNonelist[int] | None
See the component docstring.
convergence_threshold0.001float
See the component docstring.
shrink_factor4int
See the component docstring.
mask_nameNonestr | None
See the component docstring.
- registration
Register moving modalities onto a fixed reference (ANTs / SitK / elastix). Required:
fixed_image. Optional:backend, type_of_transform, metric, optimizer, use_mask, replace_by_fixed_image_mask, mask_key, elastix_parameter_files, elastix_path, transformix_path, elastix_threads, elastix_parameter_overrides, number_of_histogram_bins, metric_sampling_percentage, shrink_factors_per_level, smoothing_sigmas_per_level, learning_rate, number_of_iterations, bspline_mesh_size, bspline_order.Spec("registration", {"fixed_image": ...})Registry.create("registration", fixed_image=...)Param
Default
Allowed / type
Meaning
fixed_image(required)str
See the component docstring.
backend'ants'str
See the component docstring.
type_of_transform'SyN'str
See the component docstring.
metric'MI'str
See the component docstring.
optimizerNonestr | None
See the component docstring.
use_maskFalsebool
See the component docstring.
replace_by_fixed_image_maskTruebool
See the component docstring.
mask_key''str
See the component docstring.
elastix_parameter_filesNonestr | None
See the component docstring.
elastix_pathNonestr | None
See the component docstring.
transformix_pathNonestr | None
See the component docstring.
elastix_threads0int
See the component docstring.
elastix_parameter_overridesNonedict | None
See the component docstring.
number_of_histogram_bins50int
See the component docstring.
metric_sampling_percentage0.01float
See the component docstring.
shrink_factors_per_levelNonelist[int] | None
See the component docstring.
smoothing_sigmas_per_levelNonelist[float] | None
See the component docstring.
learning_rate1.0float
See the component docstring.
number_of_iterations100int
See the component docstring.
bspline_mesh_size8int
See the component docstring.
bspline_order3int
See the component docstring.
- reorientation
Reorient images (and masks) to a canonical DICOM orientation. Required:
(none). Optional:target_orientation, mode.Spec("reorientation")Registry.create("reorientation")Param
Default
Allowed / type
Meaning
target_orientation'LPS'str
See the component docstring.
mode'closest'str
See the component docstring.
- resample
Resample images (and matching masks) to a target voxel spacing. Required:
(none). Optional:target_spacing, img_mode, padding_mode, align_corners.Spec("resample")Registry.create("resample")Param
Default
Allowed / type
Meaning
target_spacing(1.0, 1.0, 1.0)Sequence
See the component docstring.
img_mode'bilinear'str
See the component docstring.
padding_mode'border'str
See the component docstring.
align_cornersFalsebool
See the component docstring.
- zscore_normalization
Z-score intensity normalization (float32; signed values preserved). Required:
(none). Optional:only_inmask, mask_key, clip_values.Spec("zscore_normalization")Registry.create("zscore_normalization")Param
Default
Allowed / type
Meaning
only_inmaskFalsebool
See the component docstring.
mask_keyNonestr | None
See the component docstring.
clip_valuesNonetuple[float, float] | None
See the component docstring.
table_preprocessor
- binning
K-bins discretisation of every feature to ordinal bin indices. Required:
(none). Optional:n_bins, bin_strategy, across_features.Spec("binning")Registry.create("binning")Param
Default
Allowed / type
Meaning
n_bins10int
See the component docstring.
bin_strategy'uniform'str
See the component docstring.
across_featuresFalsebool
See the component docstring.
- correlation_filter
Greedily drop redundant, highly correlated feature columns. Required:
(none). Optional:corr_threshold, corr_method.Spec("correlation_filter")Registry.create("correlation_filter")Param
Default
Allowed / type
Meaning
corr_threshold0.95float
See the component docstring.
corr_method'spearman'str
See the component docstring.
- l2
Scale each table row to unit Euclidean length. Required:
(none). Optional:(none).Spec("l2")Registry.create("l2")- log
Log transform
log(x - min_train + 1)of every feature. Required:(none). Optional:across_features.Spec("log")Registry.create("log")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- maxabs
Scale every feature by its training max absolute value. Required:
(none). Optional:across_features.Spec("maxabs")Registry.create("maxabs")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- minmax
Min-max scaling of every feature to [0, 1]. Required:
(none). Optional:across_features.Spec("minmax")Registry.create("minmax")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- precise_correlation_filter
Prior 2024 Spearman screen on a modelling table. Required:
(none). Optional:corr_threshold, p_threshold.Spec("precise_correlation_filter")Registry.create("precise_correlation_filter")Param
Default
Allowed / type
Meaning
corr_threshold0.7float
See the component docstring.
p_threshold0.05float
See the component docstring.
- quantile
Map each feature onto a uniform or normal distribution by percentile rank. Required:
(none). Optional:across_features, n_quantiles, output_distribution.Spec("quantile")Registry.create("quantile")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
n_quantiles1000int
See the component docstring.
output_distribution'uniform'str
See the component docstring.
- robust
Robust scaling of every feature by training median and IQR. Required:
(none). Optional:across_features.Spec("robust")Registry.create("robust")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
- variance_filter
Drop feature columns whose training variance is at/below a threshold. Required:
(none). Optional:variance_threshold, keep_at_least_one.Spec("variance_filter")Registry.create("variance_filter")Param
Default
Allowed / type
Meaning
variance_threshold0.0float
See the component docstring.
keep_at_least_oneTruebool
See the component docstring.
- winsorize
Clip extreme feature values at training quantiles. Required:
(none). Optional:winsor_limits, across_features.Spec("winsorize")Registry.create("winsorize")Param
Default
Allowed / type
Meaning
winsor_limits(0.05, 0.05)tuple[float, float]
See the component docstring.
across_featuresFalsebool
See the component docstring.
- zscore
Z-score standardisation of every feature. Required:
(none). Optional:across_features.Spec("zscore")Registry.create("zscore")Param
Default
Allowed / type
Meaning
across_featuresFalsebool
See the component docstring.
feature_selector
- anova
Univariate ANOVA F-value selection against the outcome. Required:
(none). Optional:p_threshold, n_features_to_select.Spec("anova")Registry.create("anova")Param
Default
Allowed / type
Meaning
p_threshold0.05float
See the component docstring.
n_features_to_selectNoneint | float | NoneType
See the component docstring.
- chi2
Univariate chi-square selection against a categorical outcome. Required:
(none). Optional:p_threshold, n_features_to_select.Spec("chi2")Registry.create("chi2")Param
Default
Allowed / type
Meaning
p_threshold0.05float
See the component docstring.
n_features_to_selectNoneint | float | NoneType
See the component docstring.
- correlation
Unsupervised greedy removal of highly correlated features. Required:
(none). Optional:threshold, method.Spec("correlation")Registry.create("correlation")Param
Default
Allowed / type
Meaning
threshold0.8float
See the component docstring.
method'spearman'str
See the component docstring.
- icc
Test-retest stability selection by intraclass correlation coefficient. Required:
(none). Optional:threshold, icc_type.Spec("icc")Registry.create("icc")Param
Default
Allowed / type
Meaning
threshold0.75float
See the component docstring.
icc_type'icc3'str
See the component docstring.
- icc_precomputed
Stability selection from a PRECOMPUTED ICC results JSON. Required:
icc_results_path, groups. Optional:threshold, metric.Spec("icc_precomputed", {"icc_results_path": ..., "groups": ...})Registry.create("icc_precomputed", icc_results_path=..., groups=...)Param
Default
Allowed / type
Meaning
icc_results_path(required)str
See the component docstring.
groups(required)Sequence
See the component docstring.
threshold0.75float
See the component docstring.
metricNonestr | None
See the component docstring.
- lasso
L1-penalised (Lasso) selection with cross-validated penalty. Required:
(none). Optional:cv, n_alphas, alphas, n_jobs, estimator_params.Spec("lasso")Registry.create("lasso")Param
Default
Allowed / type
Meaning
cv10int
Cross-validation folds for
LassoCV.n_alphas100int
Number of alpha values along the regularisation path.
alphasNonelist[float] | None
Explicit alpha grid (overrides
n_alphaswhen given).n_jobs-1int
Parallel jobs for the cross-validation.
estimator_paramsNoneMapping | None
Extra keyword arguments forwarded verbatim to
LassoCV, for vendor parameters HABIT does not declare. They are validated against theLassoCVsignature at fit time and recorded in the spec fingerprint.- mrmr
Minimum-redundancy-maximum-relevance (MRMR) selection. Required:
(none). Optional:n_features, task_type.Spec("mrmr")Registry.create("mrmr")Param
Default
Allowed / type
Meaning
n_features10int
See the component docstring.
task_type'classification'str
See the component docstring.
- rfecv
Recursive feature elimination with cross-validation (RFECV). Required:
(none). Optional:estimator, step, cv, scoring, min_features_to_select, n_jobs.Spec("rfecv")Registry.create("rfecv")Param
Default
Allowed / type
Meaning
estimator'RandomForestClassifier'str
See the component docstring.
step1int
See the component docstring.
cv5int
See the component docstring.
scoring'roc_auc'str
See the component docstring.
min_features_to_select1int
See the component docstring.
n_jobs-1int
See the component docstring.
- statistical_test
Two-group univariate selection with automatic test choice. Required:
(none). Optional:p_threshold, n_features_to_select, normality_test_threshold, force_test.Spec("statistical_test")Registry.create("statistical_test")Param
Default
Allowed / type
Meaning
p_threshold0.05float
See the component docstring.
n_features_to_selectNoneint | float | NoneType
See the component docstring.
normality_test_threshold0.05float
See the component docstring.
force_testNonestr | None
See the component docstring.
- stepwise
Stepwise logistic-regression selection (forward, backward or both). Required:
(none). Optional:direction, threshold_in, threshold_out, criterion, verbose.Spec("stepwise")Registry.create("stepwise")Param
Default
Allowed / type
Meaning
direction'backward'str
See the component docstring.
threshold_in0.05float
See the component docstring.
threshold_out0.05float
See the component docstring.
criterion'aic'str
See the component docstring.
verboseFalsebool
See the component docstring.
- univariate_cox
Univariate Cox proportional-hazards selection against a survival outcome. Required:
(none). Optional:p_threshold, n_features_to_select.Spec("univariate_cox")Registry.create("univariate_cox")Param
Default
Allowed / type
Meaning
p_threshold0.05float
See the component docstring.
n_features_to_selectNoneint | float | NoneType
See the component docstring.
- univariate_logistic
Per-feature logistic regression against the outcome. Required:
(none). Optional:alpha, verbose.Spec("univariate_logistic")Registry.create("univariate_logistic")Param
Default
Allowed / type
Meaning
alpha0.05float
See the component docstring.
verboseTruebool
See the component docstring.
- variance
Unsupervised variance-based selection. Required:
(none). Optional:threshold, top_k, top_percent, keep_at_least_one.Spec("variance")Registry.create("variance")Param
Default
Allowed / type
Meaning
threshold0.0float
See the component docstring.
top_kNoneint | None
See the component docstring.
top_percentNonefloat | None
See the component docstring.
keep_at_least_oneFalsebool
See the component docstring.
- vif
Iterative variance-inflation-factor (VIF) pruning of multicollinearity. Required:
(none). Optional:max_vif.Spec("vif")Registry.create("vif")Param
Default
Allowed / type
Meaning
max_vif10.0float
See the component docstring.
classifier
- AdaBoost
Adaptive boosting of decision stumps (sklearn
AdaBoostClassifier). Required:(none). Optional:n_estimators, learning_rate.Spec("AdaBoost")Registry.create("AdaBoost")Param
Default
Allowed / type
Meaning
n_estimators50int
See the component docstring.
learning_rate1.0float
See the component docstring.
- AutoGluonTabular
AutoML classifier wrapping AutoGluon’s
TabularPredictor. Required:(none). Optional:feature_importance, label, predictor, fit.Spec("AutoGluonTabular")Registry.create("AutoGluonTabular")Param
Default
Allowed / type
Meaning
feature_importance'auto'str
See the component docstring.
labelNonestr | None
See the component docstring.
predictorNonedict | None
See the component docstring.
fitNonedict | None
See the component docstring.
- BernoulliNB
Bernoulli naive Bayes (sklearn
BernoulliNB; deterministic). Required:(none). Optional:alpha, binarize, fit_prior, class_prior.Spec("BernoulliNB")Registry.create("BernoulliNB")Param
Default
Allowed / type
Meaning
alpha1.0float
See the component docstring.
binarize0.0float | None
See the component docstring.
fit_priorTruebool
See the component docstring.
class_priorNonelist[float] | None
See the component docstring.
- DecisionTree
Single CART decision tree (sklearn
DecisionTreeClassifier). Required:(none). Optional:criterion, splitter, max_depth, min_samples_split, min_samples_leaf, max_features, class_weight.Spec("DecisionTree")Registry.create("DecisionTree")Param
Default
Allowed / type
Meaning
criterion'gini'str
See the component docstring.
splitter'best'str
See the component docstring.
max_depthNoneint | None
See the component docstring.
min_samples_split2int
See the component docstring.
min_samples_leaf1int
See the component docstring.
max_featuresNonestr | float | int | NoneType
See the component docstring.
class_weightNonestr | dict | NoneType
See the component docstring.
- GaussianNB
Gaussian naive Bayes (sklearn
GaussianNB; deterministic). Required:(none). Optional:priors, var_smoothing.Spec("GaussianNB")Registry.create("GaussianNB")Param
Default
Allowed / type
Meaning
priorsNonelist[float] | None
See the component docstring.
var_smoothing1e-09float
See the component docstring.
- GradientBoosting
Stage-wise additive tree ensemble (sklearn
GradientBoostingClassifier). Required:(none). Optional:loss, learning_rate, n_estimators, subsample, criterion, min_samples_split, min_samples_leaf, max_depth, max_features.Spec("GradientBoosting")Registry.create("GradientBoosting")Param
Default
Allowed / type
Meaning
loss'log_loss'str
See the component docstring.
learning_rate0.1float
See the component docstring.
n_estimators100int
See the component docstring.
subsample1.0float
See the component docstring.
criterion'friedman_mse'str
See the component docstring.
min_samples_split2int
See the component docstring.
min_samples_leaf1int
See the component docstring.
max_depth3int
See the component docstring.
max_featuresNonestr | float | int | NoneType
See the component docstring.
- KNN
k-nearest-neighbours classifier (sklearn
KNeighborsClassifier). Required:(none). Optional:n_neighbors, weights, algorithm, leaf_size, p, metric, n_jobs.Spec("KNN")Registry.create("KNN")Param
Default
Allowed / type
Meaning
n_neighbors5int
See the component docstring.
weights'uniform'str
See the component docstring.
algorithm'auto'str
See the component docstring.
leaf_size30int
See the component docstring.
p2int
See the component docstring.
metric'minkowski'str
See the component docstring.
n_jobs-1int
See the component docstring.
- LogisticRegression
Penalised logistic regression (sklearn
LogisticRegression). Required:(none). Optional:C, penalty, solver, max_iter, class_weight, estimator_params.Spec("LogisticRegression")Registry.create("LogisticRegression")Param
Default
Allowed / type
Meaning
C1.0float
Inverse regularisation strength.
penalty'l2'str
Penalty norm.
solver'liblinear'str
Optimisation algorithm.
max_iter1000int
Maximum solver iterations.
class_weightNonestr | dict | NoneType
Optional class rebalancing.
estimator_paramsNoneMapping | None
Extra keyword arguments forwarded verbatim to the sklearn estimator, for vendor parameters HABIT does not declare. They are validated against the estimator signature at fit time and recorded in the spec fingerprint.
- MLP
Multi-layer perceptron classifier (sklearn
MLPClassifier). Required:(none). Optional:hidden_layer_sizes, activation, solver, alpha, batch_size, learning_rate, learning_rate_init, max_iter, shuffle, early_stopping, validation_fraction.Spec("MLP")Registry.create("MLP")Param
Default
Allowed / type
Meaning
hidden_layer_sizes(100,)tuple[int, Ellipsis]
See the component docstring.
activation'relu'str
See the component docstring.
solver'adam'str
See the component docstring.
alpha0.0001float
See the component docstring.
batch_size'auto'str | int
See the component docstring.
learning_rate'constant'str
See the component docstring.
learning_rate_init0.001float
See the component docstring.
max_iter200int
See the component docstring.
shuffleTruebool
See the component docstring.
early_stoppingFalsebool
See the component docstring.
validation_fraction0.1float
See the component docstring.
- MultinomialNB
Multinomial naive Bayes (sklearn
MultinomialNB; deterministic). Required:(none). Optional:alpha, fit_prior, class_prior.Spec("MultinomialNB")Registry.create("MultinomialNB")Param
Default
Allowed / type
Meaning
alpha1.0float
See the component docstring.
fit_priorTruebool
See the component docstring.
class_priorNonelist[float] | None
See the component docstring.
- RandomForest
Bagged decision-tree ensemble (sklearn
RandomForestClassifier). Required:(none). Optional:n_estimators, max_depth, min_samples_split, min_samples_leaf, max_features, bootstrap, class_weight.Spec("RandomForest")Registry.create("RandomForest")Param
Default
Allowed / type
Meaning
n_estimators100int
See the component docstring.
max_depthNoneint | None
See the component docstring.
min_samples_split2int
See the component docstring.
min_samples_leaf1int
See the component docstring.
max_features'sqrt'str | float | int | NoneType
See the component docstring.
bootstrapTruebool
See the component docstring.
class_weightNonestr | dict | NoneType
See the component docstring.
- SVC
Kernel support-vector classifier (sklearn
SVC). Required:(none). Optional:C, kernel, gamma, class_weight, probability.Spec("SVC")Registry.create("SVC")Param
Default
Allowed / type
Meaning
C1.0float
See the component docstring.
kernel'rbf'str
See the component docstring.
gamma'scale'str | float
See the component docstring.
class_weightNonestr | dict | NoneType
See the component docstring.
probabilityTruebool
See the component docstring.
- SVM
Linear support-vector classifier (sklearn
LinearSVC). Required:(none). Optional:C, class_weight, max_iter.Spec("SVM")Registry.create("SVM")Param
Default
Allowed / type
Meaning
C1.0float
See the component docstring.
class_weightNonestr | dict | NoneType
See the component docstring.
max_iter1000int
See the component docstring.
- XGBoost
Gradient-boosted trees from the xgboost library (
XGBClassifier). Required:(none). Optional:n_estimators, max_depth, learning_rate, subsample, colsample_bytree, objective, eval_metric.Spec("XGBoost")Registry.create("XGBoost")Param
Default
Allowed / type
Meaning
n_estimators100int
See the component docstring.
max_depth3int
See the component docstring.
learning_rate0.1float
See the component docstring.
subsample0.8float
See the component docstring.
colsample_bytree0.8float
See the component docstring.
objective'binary:logistic'str
See the component docstring.
eval_metric'logloss'str
See the component docstring.
metric
- accuracy
Fraction of exactly matching labels. Required:
(none). Optional:(none).Spec("accuracy")Registry.create("accuracy")- auc
ROC AUC over the positive-class scores. Required:
(none). Optional:(none).Spec("auc")Registry.create("auc")- f1_score
Harmonic mean of PPV and sensitivity over one shared confusion matrix. Required:
(none). Optional:(none).Spec("f1_score")Registry.create("f1_score")- hosmer_lemeshow_p_value
Hosmer-Lemeshow calibration p-value (binary outcomes only). Required:
(none). Optional:n_groups.Spec("hosmer_lemeshow_p_value")Registry.create("hosmer_lemeshow_p_value")Param
Default
Allowed / type
Meaning
n_groups10int
See the component docstring.
- npv
Negative predictive value; macro per-class mean when multi-class. Required:
(none). Optional:(none).Spec("npv")Registry.create("npv")- ppv
Positive predictive value (precision); macro mean when multi-class. Required:
(none). Optional:(none).Spec("ppv")Registry.create("ppv")- sensitivity
Sensitivity (recall, true positive rate); macro mean when multi-class. Required:
(none). Optional:(none).Spec("sensitivity")Registry.create("sensitivity")- specificity
Specificity (true negative rate); macro mean when multi-class. Required:
(none). Optional:(none).Spec("specificity")Registry.create("specificity")- spiegelhalter_z_p_value
Spiegelhalter Z-test calibration p-value (binary outcomes only). Required:
(none). Optional:(none).Spec("spiegelhalter_z_p_value")Registry.create("spiegelhalter_z_p_value")
Types
PluginInfo— name, domain, implementation, providerPluginLoadReport— result ofload_plugins
Registering a third-party plugin
External packages make components discoverable by declaring HABIT’s entry
point groups in their own packaging metadata. The group name is habit.
followed by the domain string; v1.0 domains are the snake_case singular
protocol names listed above (older plural group names remain honoured for
legacy factories). HABIT itself declares no empty groups — setuptools strips
them — the authoritative list is
habit/api/plugins.py::_ENTRY_POINT_GROUPS.
In the plugin’s pyproject.toml:
[project.entry-points."habit.supervoxelizer"]
my_slic_variant = "my_package.my_module:MySupervoxelizer"
[project.entry-points."habit.voxel_feature_extractor"]
dce_hemodynamics = "my_package.features:register"
The registered object must implement the matching protocol from the
capability package (for example
Supervoxelizer) and expose a spec
(see Spec, RunPolicy, and YAML isomorphism). For
voxel_feature_extractor, the entry point commonly points at a callable
that performs @VoxelFeatureExtractorRegistry.register(...) (same pattern
as other domains). After pip install of the plugin package,
load_plugins() surfaces it and list_plugins("supervoxelizer") /
list_plugins("voxel_feature_extractor") report
provider="<distribution>".
Runnable DIY example: Custom features.