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

オープン
#56 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
r
領域
data, performance

調査の方向性

まず、DelayedArray オブジェクトに対する mean()、anyNA()、および "Summary" グループジェネリックの実装箇所を見つけ、次に DelayedAperm と simplify() を調べます。issue で説明されている遅延操作のトランクをたどり、計算前に逆 aperm() を適用する方法を判断します。simplification によってツリーが短縮されたときに不要な遅延転置を避けながら、これらの操作が結果を維持できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
R
スター
29
フォーク
12
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Bioconductor/DelayedArray のほかの issue

Bioconductor/DelayedArray の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。