Skip to main content

Module frozen_features

Module frozen_features 

Source
Expand description

Load a pre-trained per-gene embedding (and optional per-gene bias) from parquet and strictly intersect its row axis against a caller’s target feature axis.

Used by senna gbe / topic / cell-embedded-topic to freeze the gene-side parameter table (E_feat in gbe, ρ in the ETM topic models) so cells train on a shared, pre-fit gene-relation space.

Source formats supported via FrozenLoadArgs:

  • gbe: {prefix}.dictionary.parquet + {prefix}.feature_bias.parquet (gene × H plus gene × 1 bias).
  • topic / cell-embedded-topic: {prefix}.feature_embedding.parquet alone — bias defaults to zeros, which is what the topic models use internally (no per-gene additive bias on ρ).

Name resolution goes through FeatureNameKind so TGFB1 and ENSG00000105329_TGFB1 resolve to the same row.

Structs§

FrozenFeatureHost
Loaded + aligned frozen feature side ready to hand off to a candle engine (graph-embedding-util or one of the topic-model encoders).
FrozenLoadArgs

Functions§

load_frozen_feature_host

Type Aliases§

SourceNameMap
A rename of source row names, see FrozenLoadArgs::source_name_map.