cellink.tl.external.JointNMFWrapper#
- class cellink.tl.external.JointNMFWrapper(Xh, Xd, *, n_shared=10, n_healthy_specific=5, n_disease_specific=5, gamma=1.0, mu=None, n_init=5, max_iters=1000, tol=1e-10, random_state=0)#
Joint NMF decomposition for paired healthy / disease single-cell data.
- Parameters:
Xh (
ndarray) – Dense matrix (cells x genes) for the healthy condition.Xd (
ndarray) – Dense matrix (cells x genes) for the disease condition. Must have the same shape asXh(paired cells x genes) since factor alignment correlates loadings across the two conditions cell-by-cell.n_shared (
int(default:10)) – Number of programs shared between healthy and disease (KC in paper).n_healthy_specific (
int(default:5)) – Number of programs unique to the healthy condition (KH in paper).n_disease_specific (
int(default:5)) – Number of programs unique to the disease condition (KD in paper).gamma (
float(default:1.0)) – Coupling strength. Higher values force shared programs to align more.mu (
float|None(default:None)) – L2 regularisation on loading matrices. If None, estimated from data.n_init (
int(default:5)) – Number of random NMF initialisations; best reconstruction is kept.max_iters (
int(default:1000)) – Maximum multiplicative-update iterations.tol (
float(default:1e-10)) – Convergence tolerance on relative change in cost.random_state (
int(default:0)) – Random seed for reproducibility.
Attributes table#
Methods table#
|
Run multiplicative updates until convergence. |
Attributes#
- JointNMFWrapper.Hd#
- JointNMFWrapper.Hh#
- JointNMFWrapper.Wd#
- JointNMFWrapper.Wh#
Healthy cell x factor loadings (dense).
Methods#
- JointNMFWrapper.fit()#
Run multiplicative updates until convergence.
- Return type: