biomedical_data_generator.meta.compute_feature_roles

biomedical_data_generator.meta.compute_feature_roles(meta)[source]

Derive the six-way generative feature-role partition from a DatasetMeta.

The partition is reconstructed purely from the structural block ranges that the generator records on meta (the per-group standalone-informative column indices, the standalone-noise column range, each cluster’s columns, and its structural anchor column) together with the per-cluster channel mappings. Relevance is derived per column, not per cluster: a cluster column is informative iff it carries a class-dependent mean shift (the anchor’s shift, or a proxy’s attenuated propagation) or participates in a class-dependent within-cluster correlation — never read from a declared role. Because the predicate is per column, a single cluster may be split across informative and noise roles (an informative anchor with noise proxies is expected for a mean-only cluster with zero within-cluster correlation). No feature matrix is required.

Parameters:

meta (DatasetMeta) – Resolved dataset metadata produced by biomedical_data_generator.generate_dataset().

Returns:

A FeatureRoles instance assigning every feature column to exactly one of the six generative roles, together with a column-to-cluster membership map.

Return type:

FeatureRoles