mean(), anyNA(), and members of "Summary" group generic should "untranspose"
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- r
- Domain
- data, performance
Research direction
Start by locating the implementations of mean(), anyNA(), and the "Summary" group generic for DelayedArray objects, then inspect DelayedAperm and simplify(). Trace the delayed-operation trunk described in the issue and determine how a reverse aperm() could be applied before computation. Done means these operations preserve their results while avoiding unnecessary delayed transposition when simplification shortens the tree.
Written by the indexing model from the issue text.
Description
Delayed transposition (t() or aperm()) significantly slows down block processing of a DelayedMatrix or DelayedArray object. However the result of block-processed operations like mean(), anyNA(), and members of the "Summary" group generic does not change if the input is transposed. So these operations should be smart enough to "untranspose" their input in order to be faster.
The exact algorithm for "untransposing" could be:
- Go up the tree of delayed ops in
xuntil a DelayedAperm op is found. Only climb the trunk of the tree i.e. start fromx@seedand go up only if there is exactly 1 "next seed", that is, if the current seed is a DelayedUnaryOp object. Stop on the first DelayedAperm op (i.e. the most recently applied DelayedAperm op), or when the next seed is no longer a DelayedUnaryOp object. - If no DelayedAperm op was found then there is nothing to do.
- If a DelayedAperm op is found, do
y <- aperm(x, ....)where the exactaperm()transformation is the reverse of this DelayedAperm op. The tree trunk inyshould be either shorter than the tree trunk inx(if the 2 DelayedAperm ops could be simplified) or longer (if they couldn't). If it's shorter then replacexwithybefore computingmean(),anyNA(), etc...
The advantage of this algo is that it doesn't need to know anything about the delayed ops found between the root of the tree and the first DelayedAperm op found on the trunk. It just relies on simplify().
- Dominant language
- R
- Stars
- 29
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Bioconductor/DelayedArray
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Bioconductor/DelayedArray#129 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Bioconductor/DelayedArray#127 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Bioconductor/DelayedArray#125 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Bioconductor/DelayedArray#123 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
Bioconductor/DelayedArray#122 ·