IthHabitatFeatures

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 IthHabitatFeatures(include_auxiliary: bool = False)[source]

Bases: object

ITH score for one subject’s habitat map.

The score quantifies how fragmented the habitat partition is: 1 - (1 / S_total) * sum_i(S_i,max / n_i) over connected components of each habitat. It is numerically identical to the v0.1 ITHFeatureExtractor.

By default the table has a single column, ith_score. Pass include_auxiliary=True (or Spec("ith_score", {"include_auxiliary": True})) to also write the prefixed summaries ith_num_habitats / ith_total_area and the per-habitat habitat_{id}_regions / _largest_area / _area_ratio columns. Those extras are emitted for every id the model can assign (zeros when the habitat is absent) so cohort tables stay rectangular. The prefixes avoid colliding with non_radiomics num_habitats.

__init__(include_auxiliary: bool = False) → None[source]
property spec: Spec

Return the algorithm specification.

__call__(subject: Subject, habitat_map: HabitatMap) → FeatureTable[source]

Compute the ITH feature family for one subject.

Parameters:
  • subject – Owning subject (labels suffice; intensities unused).

  • habitat_map – Habitat labels for that subject.

Returns:

One-row table. Default is ith_score only.

Examples using habit.habitat_features.IthHabitatFeatures