If you use dim. reduction, you may be interested in two recent preprints we've posted on contrastive PCA: The Rayleigh Quotient and Contrastive Principal Component Analysis I & II w/ Maria Carilli & Kayla Jackson. They cover a lot of ground from theory to practice. 1/🧵
Обсуждение
Part I explains why the contrastive PCA of @jameszou.bsky.social is flawed, and (at best) can be viewed as a Taylor approximation of a Rayleigh quotient. Optimization of the RQ directly is not only possible but tractable via a generalized eigenvalue problem. 2/ www.biorxiv.org/content/10.1...
www.biorxiv.orgThe ρPCA method is implemented in an easy to use Python package github.com/pachterlab/r... Quick to install. Fast. We now use it routinely whenever engaging in exploratory data analysis. 8/