Repository navigation
Add noise_cover for biwhitening noisy data - #107
Merged
Merged
Conversation
`noise_cover(V; shrink=0)` returns scales `a` and `b` such that the data divided by `a*b'` has noise of unit average variance in every row and column, given a matrix `V` of noise-variance estimates. For Poisson counts, `V = Y` gives the biwhitening of Landa, Zhang, and Kluger (2022). The targets count the zero entries of `V`; zero rows and columns receive zero scale. With `shrink = 0`, a max-flow test on the zero pattern of `V` certifies before solving that the scaling exists, and a `SolverFailure` names the rows or entries that prevent it. `shrink = δ > 0` instead scales `(V + δ*r*c'/s) / (1 + δ)`, which has the same total as `V` and always admits a scaling; the rank-one term is never formed as a dense matrix. The products are computed by the `PowerMean` solver, which now accepts optional per-group targets and, for p = 1, an additive rank-one term. Without them, `soft_cover` and `soft_symcover` are unchanged. A new guide page describes how to build `V` for counts, camera data, and differences such as ΔF, and how to use the normalized matrix. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
+ Coverage 98.31% 98.33% +0.02%
==========================================
Files 25 26 +1
Lines 7824 8222 +398
==========================================
+ Hits 7692 8085 +393
- Misses 132 137 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A comment between a docstring and the definition it documents separates the two, so `noise_cover` had no documentation and the docs build could not resolve references to it. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
noise_cover(V; shrink=0)returns scalesaandbsuch that the data divided bya*b'has noise of unit average variance in every row and column, given a matrixVof noise-variance estimates. For Poisson counts,V = Ygives the biwhitening of Landa, Zhang, and Kluger (2022). The targets count the zero entries ofV; zero rows and columns receive zero scale.With
shrink = 0, a max-flow test on the zero pattern ofVcertifies before solving that the scaling exists, and aSolverFailurenames the rows or entries that prevent it.shrink = δ > 0instead scales(V + δ*r*c'/s) / (1 + δ), which has the same total asVand always admits a scaling; the rank-one term is never formed as a dense matrix.The products are computed by the
PowerMeansolver, which now accepts optional per-group targets and, for p = 1, an additive rank-one term. Without them,soft_coverandsoft_symcoverare unchanged. A new guide page describes how to buildVfor counts, camera data, and differences such as ΔF, and how to use the normalized matrix.Assisted-by: Claude Opus 5.5 noreply@anthropic.com