- decoupler.run_mlm(mat, net, source='source', target='target', weight='weight', batch_size=10000, min_n=5, verbose=False, use_raw=True)
Multivariate Linear Model (MLM).
MLM fits a multivariate linear model for each sample, where the observed molecular readouts in mat are the response variable and the regulator weights in net are the covariates. Target features with no associated weight are set to zero. The obtained t-values from the fitted model are the activities (mlm_estimate) of the regulators in net.
- matlist, DataFrame or AnnData
List of [features, matrix], dataframe (samples x features) or an AnnData instance.
Network in long format.
Column name in net with source nodes.
Column name in net with target nodes.
Column name in net with weights.
Size of the samples to use for each batch. Increasing this will consume more memmory but it will run faster.
Minimum of targets per source. If less, sources are removed.
Whether to show progress.
Use raw attribute of mat if present.
MLM scores. Stored in .obsm[‘mlm_estimate’] if mat is AnnData.
Obtained p-values. Stored in .obsm[‘mlm_pvals’] if mat is AnnData.