Printing with resampling weights
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- r
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- R
- Stelle
- 343
- Fork
- 68
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tidymodels/rsample
-
tidy-dev-day :nerd_face:
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
tidymodels/rsample#611 ·
-
repeats attribute is hardcoded to 1 for group_vfold_cv()Forse già presa @taekop l’ha presa 34 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
tidymodels/rsample#607 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 68/100
tidymodels/rsample#618 ·
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
tidymodels/rsample#608 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
tidymodels/rsample#600 ·
Tutte le issue di tidymodels/rsample
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 68/100
eirini-zormpa/hpc-intro#30 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
REditorSupport/languageserver#833 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
Rdatatable/data.table#7952 ·
I maintainer di solito rispondono entro 1 giorno
-
download.SM_CDS: CDS rejects the request, then the retry loop never endsForse già presa @S1DDHEY l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
PecanProject/pecan#4219 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni