Printing with resampling weights
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
Start by locating the S3 print methods for rset and manual_rset and inspect how subclasses such as v_fold dispatch printing. Check the proposed weighted-output behavior against the existing default printing path, then verify that weighted rsets show fold_weight while unweighted objects retain their current output.
索引モデルが issue の本文から書いたものです。
説明
With printing in the rset objects, I think that we'll have to move this code into an rsample PR.
Most of the rsets have a superseding class (like v_fold) and the print method for that class happens first.
Using v_fold as an example, its print method removes the first two classes (v_fold and rset) so that the remaining printing is the default tibble printing. That's why there is not a rsample:::print.rset method.
I'm going to temporarily remove the print methods and make this comment an issue for rsample, and then Hannah can take a look (who is out of office next week 😿)
#' @export
print.rset <- function(x, ...) {
fold_weights <- attr(x, ".fold_weights")
if (!is.null(fold_weights)) {
# Create a tibble with fold weights as a column
x_tbl <- tibble::as_tibble(x)
x_tbl$fold_weight <- fold_weights
print(x_tbl, ...)
} else {
# Use default behavior
NextMethod("print")
}
}
#' @export
print.manual_rset <- function(x, ...) {
fold_weights <- attr(x, ".fold_weights")
if (!is.null(fold_weights)) {
# Create a tibble with fold weights as a column
x_tbl <- tibble::as_tibble(x)
x_tbl$fold_weight <- fold_weights
print(x_tbl, ...)
} else {
# Use default behavior for manual_rset
NextMethod("print")
}
}
Originally posted by @topepo in https://github.com/tidymodels/tune/issues/1007#issuecomment-3417377573
- 主要言語
- 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
-
priority: could techdebt
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 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 日以内に返信