Skip to content

use .pred instead of .pred_survival at highest level #589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: parsnip
Title: A Common API to Modeling and Analysis Functions
Version: 0.1.7.9000
Version: 0.1.7.9001
Authors@R:
c(person(given = "Max",
family = "Kuhn",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

* Fixed a bug for `logistic_reg()` with the LiblineaR engine (#552).

* The list column produced when creating survival probability predictions is now always called `.pred` (with `.pred_survival` being used inside of the list column).

# parsnip 0.1.7

Expand Down
5 changes: 3 additions & 2 deletions R/predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
#'
#' * `type = "time"` produces a column `.pred_time`.
#' * `type = "hazard"` results in a column `.pred_hazard`.
#' * `type = "survival"` results in a column `.pred_survival`.
#' * `type = "survival"` results in a list column containing tibbles with a
#' `.pred_survival` column.
#'
#' For the last two types, the results are a nested tibble with an overall
#' column called `.pred` with sub-tibbles with the above format.
Expand Down Expand Up @@ -255,7 +256,7 @@ format_survival <- function(x) {
x <- as_tibble(x, .name_repair = "minimal")
names(x) <- ".pred"
} else {
x <- tibble(.pred_survival = unname(x))
x <- tibble(.pred = unname(x))
}

x
Expand Down
3 changes: 2 additions & 1 deletion man/bart-internal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/predict.model_fit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.