Nested CV is Memory-inefficient
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- r
調査の方向性
Start with the nested_cv() example using LetterRecognition, vfold_cv(), and lobstr::obj_size(), then compare it with the bootstrap resampling example linked in the issue. Investigate how nested resamples retain data and verify the result by measuring object size as the number of folds changes; done means nested resampling no longer scales linearly in memory.
索引モデルが issue の本文から書いたものです。
説明
Hello,
I noticed that when using nested_cv (or bringing over a custom nested resampling scheme via caret2rsample(), the memory does scale linearly with the number of folds. This is in contrast to a single resampling (for example the bootstrap resampling example on the rsample documentation landing page), where a feature of the package is that the memory doesn't blow up when resampling a dataset many times.
I adapted that example to show what I'm talking about:
library(rsample)
library(mlbench)
data(LetterRecognition)
lobstr::obj_size(LetterRecognition)
# 2,644,640 B
set.seed(35222)
#For an example, an outer 5 fold cv with each outer fold having an inner 2 fold cv
nested <- rsample::nested_cv(LetterRecognition, outside = vfold_cv(times = 5),inside=vfold_cv(times = 2))
lobstr::obj_size(nested)
#34,434,200 B
# Object size per resample - Actually slightly bigger than what we started with
lobstr::obj_size(nested)/nrow(nested)
#3,443,420 B
# Fold increase is > 10
as.numeric(lobstr::obj_size(nested)/lobstr::obj_size(LetterRecognition))
#13.02037
Unless I'm missing something, nested resampling on a large dataset doesn't seem to be possible, since the memory required will quickly add up.
- 主要言語
- R
- スター
- 343
- フォーク
- 68
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tidymodels/rsample のほかの issue
-
tidy-dev-day :nerd_face:
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
tidymodels/rsample#611 ·
-
repeats attribute is hardcoded to 1 for group_vfold_cv()対応中かも @taekop が 33 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
tidymodels/rsample#607 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
tidymodels/rsample#618 ·
-
documentation
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
tidymodels/rsample#608 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tidymodels/rsample#600 ·
tidymodels/rsample の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
microsoft/ML-For-Beginners#1061 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
Rapporteket/rapbase#535 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
PecanProject/pecan#4218 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
HenrikBengtsson/R.matlab#61 ·