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

Abierto
#56 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
32/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
r
Área
data, performance

Línea de trabajo

Comienza localizando las implementaciones de mean(), anyNA() y el genérico del grupo "Summary" para objetos DelayedArray; después, inspecciona DelayedAperm y simplify(). Sigue el tronco de operaciones diferidas descrito en el issue y determina cómo podría aplicarse un aperm() inverso antes del cálculo. Se considera terminado cuando estas operaciones conservan sus resultados y evitan una transposición diferida innecesaria cuando la simplificación acorta el árbol.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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().

Lenguaje dominante
R
Estrellas
29
Forks
12
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Bioconductor/DelayedArray

Todos los issues de Bioconductor/DelayedArray

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.