Skip to content

Commit af897c7

Browse files
authored
use .pred instead of .pred_survival at highest level (#589)
1 parent 28dc688 commit af897c7

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: parsnip
22
Title: A Common API to Modeling and Analysis Functions
3-
Version: 0.1.7.9000
3+
Version: 0.1.7.9001
44
Authors@R:
55
c(person(given = "Max",
66
family = "Kuhn",

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

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

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

1415
# parsnip 0.1.7
1516

R/predict.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
#'
8484
#' * `type = "time"` produces a column `.pred_time`.
8585
#' * `type = "hazard"` results in a column `.pred_hazard`.
86-
#' * `type = "survival"` results in a column `.pred_survival`.
86+
#' * `type = "survival"` results in a list column containing tibbles with a
87+
#' `.pred_survival` column.
8788
#'
8889
#' For the last two types, the results are a nested tibble with an overall
8990
#' column called `.pred` with sub-tibbles with the above format.
@@ -255,7 +256,7 @@ format_survival <- function(x) {
255256
x <- as_tibble(x, .name_repair = "minimal")
256257
names(x) <- ".pred"
257258
} else {
258-
x <- tibble(.pred_survival = unname(x))
259+
x <- tibble(.pred = unname(x))
259260
}
260261

261262
x

man/bart-internal.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/predict.model_fit.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)