mean(), anyNA(), and members of "Summary" group generic should "untranspose"

Aperta
#56 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
32/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
r
Ambito
data, performance

Direzione di ricerca

Inizia individuando le implementazioni di mean(), anyNA() e del generico del gruppo "Summary" per gli oggetti DelayedArray, quindi esamina DelayedAperm e simplify(). Segui il tronco delle operazioni differite descritto nell’issue e determina come si potrebbe applicare un aperm() inverso prima del calcolo. Il lavoro è completato quando queste operazioni preservano i propri risultati evitando al contempo una trasposizione differita non necessaria quando la semplificazione accorcia l’albero.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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 x until a DelayedAperm op is found. Only climb the trunk of the tree i.e. start from x@seed and 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 exact aperm() transformation is the reverse of this DelayedAperm op. The tree trunk in y should be either shorter than the tree trunk in x (if the 2 DelayedAperm ops could be simplified) or longer (if they couldn't). If it's shorter then replace x with y before computing mean(), 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().

Lingua principale
R
Stelle
29
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Bioconductor/DelayedArray

Tutte le issue di Bioconductor/DelayedArray

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.