univi.evaluation.encode_fused_adata_pair#
- univi.evaluation.encode_fused_adata_pair(model, adata_by_mod, *, device='cpu', batch_size=1024, use_mean=True, return_gates=True, return_gate_logits=True, write_to_adatas=True, fused_obsm_key='X_univi_fused', gate_prefix='gate', layer_by_mod=None, X_key_by_mod=None)[source]#
Encode a fused posterior for paired/multi-observed cells.
- Expected:
all AnnData share identical obs_names in the same order.
- Returns dict with keys:
“Z_fused” (n_cells, latent_dim)
“mu”, “logvar”
“gates” (or None)
“gate_logits” (or None)
“modality_order” (the order corresponding to columns of gates)