Skip to content
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
6 changes: 3 additions & 3 deletions 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: 1.1.1.9008
Version: 1.2.0
Authors@R: c(
person("Max", "Kuhn", , "max@posit.co", role = c("aut", "cre")),
person("Davis", "Vaughan", , "davis@posit.co", role = "aut"),
Expand All @@ -17,7 +17,7 @@ URL: https://github.com/tidymodels/parsnip,
https://parsnip.tidymodels.org/
BugReports: https://github.com/tidymodels/parsnip/issues
Depends:
R (>= 3.5)
R (>= 3.6)
Imports:
cli,
dplyr (>= 1.1.0),
Expand Down Expand Up @@ -76,4 +76,4 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ S3method(predict_linear_pred,model_fit)
S3method(predict_numeric,"_elnet")
S3method(predict_numeric,"_glmnetfit")
S3method(predict_numeric,model_fit)
S3method(predict_predint,model_fit)
S3method(predict_quantile,model_fit)
S3method(predict_raw,"_elnet")
S3method(predict_raw,"_glmnetfit")
Expand Down Expand Up @@ -283,12 +284,15 @@ export(pred_value_template)
export(predict.model_fit)
export(predict_class.model_fit)
export(predict_classprob.model_fit)
export(predict_confint)
export(predict_confint.model_fit)
export(predict_hazard.model_fit)
export(predict_linear_pred)
export(predict_linear_pred.model_fit)
export(predict_numeric)
export(predict_numeric.model_fit)
export(predict_predint)
export(predict_predint.model_fit)
export(predict_quantile.model_fit)
export(predict_raw)
export(predict_raw.model_fit)
Expand Down
25 changes: 15 additions & 10 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,38 @@
# parsnip (development version)
# parsnip 1.2.0

* We no longer add `eval_time` arguments to the prediction specification for the engine (#1039).

* parsnip now lets the engines for [mlp()] check for acceptable values of the activation function (#1019)
## Bug Fixes

* Tightened logic for outcome checking. This resolves issues—some errors and some silent failures—when atomic outcome variables have an attribute (#1060, #1061).

* `rpart_train()` has been deprecated in favor of using `decision_tree()` with the `"rpart"` engine or `rpart::rpart()` directly (#1044).

* Fixed bug in fitting some model types with the `"spark"` engine (#1045).

* Fixed issues in metadata for the `"brulee"` engine where several arguments were mistakenly protected. (#1050, #1054)

* Fixed documentation for `mlp(engine = "brulee")`: the default values for `learn_rate` and `epochs` were swapped (#1018).

* Fixed a bug in the integration with workflows where using a model formula with a formula preprocessor could result in a double intercept (#1033).

## Other Changes

* We no longer add `eval_time` arguments to the prediction specification for the engine (#1039).

* parsnip now lets the engines for [mlp()] check for acceptable values of the activation function (#1019)

* `rpart_train()` has been deprecated in favor of using `decision_tree()` with the `"rpart"` engine or `rpart::rpart()` directly (#1044).

* `.filter_eval_time()` was moved to the survival standalone file.

* Improved errors and documentation related to special terms in formulas. See `?model_formula` to learn more. (#770, #1014)

* Improved errors in cases where the outcome column is mis-specified. (#1003)

* Fixed documentation for `mlp(engine = "brulee")`: the default values for `learn_rate` and `epochs` were swapped (#1018).

* The `new_data` argument for the `predict()` method for `censoring_model_reverse_km` objects has been deprecated (#965).

* When computing censoring weights, the resulting vectors are no longer named (#1023).

* Fixed a bug in the integration with workflows where using a model formula with a formula preprocessor could result in a double intercept (#1033).

* The `predict()` method for `censoring_model_reverse_km` objects now checks that `...` are empty (#1029).


# parsnip 1.1.1

* Fixed bug where prediction on rank deficient `lm()` models produced `.pred_res` instead of `.pred`. (#985)
Expand Down
4 changes: 4 additions & 0 deletions R/engine_docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
#' @keywords internal
#' @export
knit_engine_docs <- function(pattern = NULL) {
old_cli_opt <- options()$cli.unicode
on.exit(options(cli.unicode = old_cli_opt))
options(cli.unicode = FALSE)

rmd_files <- list.files("man/rmd", pattern = "\\.Rmd", full.names = TRUE)

if (!is.null(pattern)) {
Expand Down
36 changes: 22 additions & 14 deletions R/predict_interval.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,29 @@ predict_confint.model_fit <- function(object, new_data, level = 0.95, std_error
res
}

# @export
# @keywords internal
# @rdname other_predict
# @inheritParams predict.model_fit
#' @export
#' @keywords internal
#' @rdname other_predict
#' @inheritParams predict.model_fit
predict_confint <- function(object, ...)
UseMethod("predict_confint")

# ------------------------------------------------------------------------------

# @keywords internal
# @rdname other_predict
# @inheritParams predict.model_fit
# @method predict_predint model_fit
# @export predict_predint.model_fit
# @export
#' @export
#' @keywords internal
#' @rdname other_predict
#' @inheritParams predict.model_fit
predict_predint <- function(object, ...)
UseMethod("predict_predint")


#' @keywords internal
#' @rdname other_predict
#' @inheritParams predict.model_fit
#' @method predict_predint model_fit
#' @export predict_predint.model_fit
#' @export
predict_predint.model_fit <- function(object, new_data, level = 0.95, std_error = FALSE, ...) {

check_spec_pred_type(object, "pred_int")
Expand Down Expand Up @@ -88,10 +96,10 @@ predict_predint.model_fit <- function(object, new_data, level = 0.95, std_error
res
}

# @export
# @keywords internal
# @rdname other_predict
# @inheritParams predict.model_fit
#' @export
#' @keywords internal
#' @rdname other_predict
#' @inheritParams predict.model_fit
predict_predint <- function(object, ...)
UseMethod("predict_predint")

9 changes: 0 additions & 9 deletions R/surv_reg_flexsurv.R

This file was deleted.

9 changes: 0 additions & 9 deletions R/surv_reg_survival.R

This file was deleted.

4 changes: 2 additions & 2 deletions man/details_gen_additive_mod_mgcv.Rd

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

3 changes: 1 addition & 2 deletions man/details_mlp_brulee.Rd

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

2 changes: 1 addition & 1 deletion man/details_proportional_hazards_glmnet.Rd

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

67 changes: 0 additions & 67 deletions man/details_surv_reg_flexsurv.Rd

This file was deleted.

91 changes: 0 additions & 91 deletions man/details_surv_reg_survival.Rd

This file was deleted.

Loading