Skip to content

Conversation

@nbedanova
Copy link
Contributor

ADMM cytokine deconvolution function added. It made sense to me to enforce non-negativity in the W (convolution matrix) but let me know your thoughts on that.
You can run the ParseADMM figure to try out the code and visualize results.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an ADMM-based cytokine deconvolution method to decompose the cytokine factor matrix A into W @ H, where W represents cytokine interactions and H represents effect patterns. The ADMM algorithm includes optional non-negativity constraints on W (enforcing that cytokines only activate, not inhibit) and provides better convergence guarantees compared to gradient-based methods. A companion visualization figure is included to compare the ADMM results with the original factor matrix.

Key Changes:

  • Added deconvolution_cytokine_admm() function implementing ADMM optimization with L1 regularization, adaptive penalty parameter, and configurable non-negativity constraints
  • Created figureParseADMM.py to visualize the deconvolved matrices and cytokine interaction heatmap
  • Reformatted gradient computation in existing deconvolution_cytokine() for better readability

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.

File Description
pf2rnaseq/factorization.py Added ADMM-based cytokine deconvolution function with comprehensive parameter control, convergence tracking, and detailed logging; reformatted existing gradient computation for clarity
pf2rnaseq/figures/figureParseADMM.py New figure file to visualize ADMM deconvolution results including deconvolved matrix H, original effects A, and cytokine signaling matrix W as a heatmap

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nbedanova nbedanova requested a review from aarmey December 10, 2025 23:02
@aarmey
Copy link
Member

aarmey commented Dec 11, 2025

@nbedanova let me know if this works better. It looks like your initial matrices were a local minimum, so ADMM would quit early. I see it fitting over multiple iterations now.

@nbedanova
Copy link
Contributor Author

@nbedanova let me know if this works better. It looks like your initial matrices were a local minimum, so ADMM would quit early. I see it fitting over multiple iterations now.

I think this helped, starting to see some more patterns that make sense. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants