omicverse.metabol.opls_da

Contents

omicverse.metabol.opls_da#

omicverse.metabol.opls_da(adata, *, group_col='group', group_a=None, group_b=None, n_ortho=1, scale=False, max_iter=500, tol=1e-08)[source]#

Orthogonal Projection to Latent Structures — Discriminant Analysis.

Port of Trygg & Wold 2002 — NIPALS-style iteration that separates one predictive component (captures variance correlated with Y) from n_ortho orthogonal components (variance uncorrelated with Y but present in X). The predictive component’s loadings + VIP are the publication-quality output.

Parameters:

n_ortho (int (default: 1)) – Number of orthogonal components to extract. 1 is usually enough for a two-group comparison; increase if the data have strong batch or technical structure.

Return type:

PLSDAResult