Switch default optimizer to CG with multi-start#1284
Open
Marius1311 wants to merge 1 commit into
Open
Conversation
Switch the default GPCCA rotation optimizer from Nelder-Mead to conjugate gradient (CG) with 10 random restarts so that compute_macrostates() scales to large numbers of macrostates (m > 15) where Nelder-Mead is impractical. - Default optimizer: "Nelder-Mead" -> "CG" - Default n_starts: 1 -> 10 (perturbation_scale=0.1) - Expose n_starts, perturbation_scale, seed on compute_macrostates() - fit() now forwards optimizer parameters to compute_macrostates() - .gitignore: add uv.lock and .github/prompts/ Requires pyGPCCA with the analytical-Jacobian / multi-start SO(k) rotation support (msmdev/pyGPCCA feature/gradient-optimization). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
05d14d4 to
785a696
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switch the default GPCCA rotation optimizer from Nelder-Mead to conjugate gradient (CG) with 10 random restarts. This makes
compute_macrostates()scale to large numbers of macrostates (m > 15) where Nelder-Mead becomes impractical.Changes
"Nelder-Mead"→"CG"1→10(withperturbation_scale=0.1)compute_macrostates():n_starts,perturbation_scale,seed— these were already supported by pyGPCCA but not exposed in CellRankfit()method: Now forwards optimizer parameters tocompute_macrostates()(previously always used hardcoded defaults)uv.lockand.github/prompts/Benchmark results
Validated on pancreas (2,531 cells) and bone marrow (5,780 cells) datasets:
Dependencies
Requires pyGPCCA from
msmdev/pyGPCCAbranchfeature/gradient-optimizationwhich implements the analytical Jacobian and multi-start SO(k) rotation perturbation.