Skip to content

Commit fc953dd

Browse files
authored
RC 1.1.1 (#995)
* version bump * Documented arguments not in \usage * changes for CRAN check; see Rdatatable/data.table#5658 * avoid tests on cran * remove old checks; no longer supported in current python
1 parent e6cd72f commit fc953dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+192
-170
lines changed

.github/workflows/old-tensorflow.yaml

Lines changed: 0 additions & 79 deletions
This file was deleted.

DESCRIPTION

Lines changed: 2 additions & 2 deletions
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: 1.1.0.9004
3+
Version: 1.1.1
44
Authors@R: c(
55
person("Max", "Kuhn", , "[email protected]", role = c("aut", "cre")),
66
person("Davis", "Vaughan", , "[email protected]", role = "aut"),
@@ -76,4 +76,4 @@ Config/testthat/edition: 3
7676
Encoding: UTF-8
7777
LazyData: true
7878
Roxygen: list(markdown = TRUE)
79-
RoxygenNote: 7.2.3
79+
RoxygenNote: 7.2.3.9000

NEWS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# parsnip (development version)
1+
# parsnip 1.1.1
22

3-
* Fixed bug where sparse data was being coerced to non-sparse format doing `predict()`.
3+
* Fixed bug where prediction on rank deficient `lm()` models produced `.pred_res` instead of `.pred`. (#985)
44

5-
* `augment()` now works for censored regression models.
5+
* Fixed bug where sparse data was being coerced to non-sparse format doing `predict()`.
66

77
* For BART models with the `dbarts` engine, `predict()` can now also return the standard error for confidence and prediction intervals (#976).
88

9-
* A few censored regression helper functions were exported: `.extract_surv_status()` and `.extract_surv_time()` (#973, #980).
9+
* `augment()` now works for censored regression models.
1010

11-
* Fixed bug where prediction on rank dificient `lm()` models produced `.pred_res` instead of `.pred`. (#985)
11+
* A few censored regression helper functions were exported: `.extract_surv_status()` and `.extract_surv_time()` (#973, #980).
1212

1313
* Fixed bug where `boost_tree()` models couldn't be fit with 1 predictor if `validation` argument was used. (#994)
1414

R/aaa_models.R

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ model_info_table <-
5454
#' @keywords internal
5555
#' @references "How to build a parsnip model"
5656
#' \url{https://www.tidymodels.org/learn/develop/models/}
57-
#' @examples
57+
#' @examplesIf !parsnip:::is_cran_check()
5858
#' # Access the model data:
5959
#' current_code <- get_model_env()
6060
#' ls(envir = current_code)
@@ -473,7 +473,6 @@ check_interface_val <- function(x) {
473473
#' `"rand_forest"`, etc).
474474
#' @param mode A single character string for the model mode (e.g. "regression").
475475
#' @param eng A single character string for the model engine.
476-
#' @param arg A single character string for the model argument name.
477476
#' @param has_submodel A single logical for whether the argument
478477
#' can make predictions on multiple submodels at once.
479478
#' @param func A named character vector that describes how to call
@@ -483,10 +482,6 @@ check_interface_val <- function(x) {
483482
#' used to invoke the usual linear regression function. In some
484483
#' cases, it is helpful to use `c(fun = "predict")` when using a
485484
#' package's `predict` method.
486-
#' @param fit_obj A list with elements `interface`, `protect`,
487-
#' `func` and `defaults`. See the package vignette "Making a
488-
#' `parsnip` model from scratch".
489-
#' @param pred_obj A list with elements `pre`, `post`, `func`, and `args`.
490485
#' @param type A single character value for the type of prediction. Possible
491486
#' values are: `class`, `conf_int`, `numeric`, `pred_int`, `prob`, `quantile`,
492487
#' and `raw`.
@@ -557,7 +552,7 @@ check_interface_val <- function(x) {
557552
#'
558553
#' @references "How to build a parsnip model"
559554
#' \url{https://www.tidymodels.org/learn/develop/models/}
560-
#' @examples
555+
#' @examplesIf !parsnip:::is_cran_check()
561556
#' # set_new_model("shallow_learning_model")
562557
#'
563558
#' # Show the information about a model:

R/aaa_multi_predict.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ predict.model_spec <- function(object, ...) {
5353
#' `multi_predict_args()` returns a character vector of argument names (or `NA`
5454
#' if none exist).
5555
#' @keywords internal
56-
#' @examples
56+
#' @examplesIf !parsnip:::is_cran_check()
5757
#' lm_model_idea <- linear_reg() %>% set_engine("lm")
5858
#' has_multi_predict(lm_model_idea)
5959
#' lm_model_fit <- fit(lm_model_idea, mpg ~ ., data = mtcars)

R/adds.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @param x A data frame
44
#' @return The same data frame with a column of 1-based integers named `.row`.
5-
#' @examples
5+
#' @examplesIf !parsnip:::is_cran_check()
66
#' mtcars %>% add_rowindex()
77
#' @export
88
add_rowindex <- function(x) {

R/arguments.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ check_eng_args <- function(args, obj, core_args) {
4040
#' @return An updated model object.
4141
#' @details `set_args()` will replace existing values of the arguments.
4242
#'
43-
#' @examples
43+
#' @examplesIf !parsnip:::is_cran_check()
4444
#' rand_forest()
4545
#'
4646
#' rand_forest() %>%
@@ -294,7 +294,7 @@ make_xy_call <- function(object, target, env) {
294294
#' @param offset A number subtracted off of the number of rows available in the
295295
#' data.
296296
#' @return An integer (and perhaps a warning).
297-
#' @examples
297+
#' @examplesIf !parsnip:::is_cran_check()
298298

299299
#' nearest_neighbor(neighbors= 100) %>%
300300
#' set_engine("kknn") %>%

R/augment.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#' @references
3838
#' \url{https://www.tidymodels.org/learn/statistics/survival-metrics/}
3939
#' @export
40-
#' @examples
40+
#' @examplesIf !parsnip:::is_cran_check()
4141
#' car_trn <- mtcars[11:32,]
4242
#' car_tst <- mtcars[ 1:10,]
4343
#'

R/bart.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#'
4343
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("bart")}
4444
#'
45-
#' @examples
45+
#' @examplesIf !parsnip:::is_cran_check()
4646
#' show_engines("bart")
4747
#'
4848
#' bart(mode = "regression", trees = 5)

R/boost_tree.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("boost_tree")},
4848
#' [xgb_train()], [C5.0_train()]
4949
#'
50-
#' @examples
50+
#' @examplesIf !parsnip:::is_cran_check()
5151
#' show_engines("boost_tree")
5252
#'
5353
#' boost_tree(mode = "classification", trees = 20)

R/c5_rules.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#' @seealso [C50::C5.0()], [C50::C5.0Control()],
4040
#' \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("C5_rules")}
4141
#'
42-
#' @examples
42+
#' @examplesIf !parsnip:::is_cran_check()
4343
#' show_engines("C5_rules")
4444
#'
4545
#' C5_rules()
@@ -73,7 +73,7 @@ C5_rules <-
7373
#'
7474
#' @param object A `C5_rules` model specification.
7575
#' @inheritParams update.boost_tree
76-
#' @examples
76+
#' @examplesIf !parsnip:::is_cran_check()
7777
#'
7878
#' # ------------------------------------------------------------------------------
7979
#'

R/condense_control.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#' @keywords internal
1414
#' @export
1515
#'
16-
#' @examples
16+
#' @examplesIf !parsnip:::is_cran_check()
1717
#' ctrl <- control_parsnip(catch = TRUE)
1818
#' ctrl$allow_par <- TRUE
1919
#' str(ctrl)

R/control_parsnip.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#' @return An S3 object with class "control_parsnip" that is a named list
1616
#' with the results of the function call
1717
#'
18-
#' @examples
18+
#' @examplesIf !parsnip:::is_cran_check()
1919
#' control_parsnip(verbosity = 2L)
2020
#'
2121
#' @export

R/cubist_rules.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ cubist_rules <-
9595
# ------------------------------------------------------------------------------
9696

9797
#' @param object A Cubist model specification.
98-
#' @examples
98+
#' @examplesIf !parsnip:::is_cran_check()
9999
#'
100100
#' # ------------------------------------------------------------------------------
101101
#'

R/data.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#' @docType data
99
#' @return \item{model_db}{a data frame}
1010
#' @keywords datasets internal
11-
#' @examples
11+
#' @examplesIf !parsnip:::is_cran_check()
1212
#' data(model_db)
1313
NULL
1414

R/decision_tree.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#'
2727
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("decision_tree")}
2828
#'
29-
#' @examples
29+
#' @examplesIf !parsnip:::is_cran_check()
3030
#' show_engines("decision_tree")
3131
#'
3232
#' decision_tree(mode = "classification", tree_depth = 5)

R/engine_docs.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#' Knit engine-specific documentation
22
#' @param pattern A regular expression to specify which files to knit. The
33
#' default knits all engine documentation files.
4-
#' @param ... Options passed to [knitr::knit()].
54
#' @return A tibble with column `file` for the file name and `result` (a
65
#' character vector that echos the output file name or, when there is
76
#' a failure, the error message).
@@ -138,7 +137,7 @@ update_model_info_file <- function(path = "inst/models.tsv") {
138137
#' @name doc-tools
139138
#' @keywords internal
140139
#' @export
141-
#' @examples
140+
#' @examplesIf !parsnip:::is_cran_check()
142141
#' # See this file for step-by-step instructions.
143142
#' system.file("README-DOCS.md", package = "parsnip")
144143
#'

R/engines.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ load_libs <- function(x, quiet, attach = FALSE) {
9090
#' @param ... Any optional arguments associated with the chosen computational
9191
#' engine. These are captured as quosures and can be tuned with `tune()`.
9292
#' @return An updated model specification.
93-
#' @examples
93+
#' @examplesIf !parsnip:::is_cran_check()
9494
#' # First, set main arguments using the standardized names
9595
#' logistic_reg(penalty = 0.01, mixture = 1/3) %>%
9696
#' # Now specify how you want to fit the model with another argument
@@ -160,7 +160,7 @@ set_engine.default <- function(object, engine, ...) {
160160
#' @param x The name of a `parsnip` model (e.g., "linear_reg", "mars", etc.)
161161
#' @return A tibble.
162162
#'
163-
#' @examples
163+
#' @examplesIf !parsnip:::is_cran_check()
164164
#' show_engines("linear_reg")
165165
#' @export
166166
show_engines <- function(x) {

R/extract.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#' section.
4242
#'
4343
#' @name extract-parsnip
44-
#' @examples
44+
#' @examplesIf !parsnip:::is_cran_check()
4545
#' lm_spec <- linear_reg() %>% set_engine("lm")
4646
#' lm_fit <- fit(lm_spec, mpg ~ ., data = mtcars)
4747
#'

R/fit.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#' a "reverse Kaplan-Meier" curve that models the probability of censoring. This
5656
#' may be used later to compute inverse probability censoring weights for
5757
#' performance measures.
58-
#' @examples
58+
#' @examplesIf !parsnip:::is_cran_check()
5959
#' # Although `glm()` only has a formula interface, different
6060
#' # methods for specifying the model can be used
6161
#'

R/fit_control.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#' @return An S3 object with class "control_parsnip" that is a named list
1919
#' with the results of the function call
2020
#'
21-
#' @examples
21+
#' @examplesIf !parsnip:::is_cran_check()
2222
#' fit_control(verbosity = 2L)
2323
#'
2424
#' @details

R/gen_additive_mod.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#'
2525
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("gen_additive_mod")}
2626
#'
27-
#' @examples
27+
#' @examplesIf !parsnip:::is_cran_check()
2828
#' show_engines("gen_additive_mod")
2929
#'
3030
#' gen_additive_mod()

R/grouped_binomial.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#' @param ... Options to pass to [stats::glm()]. If `family` is not set, it will
2222
#' automatically be assigned the basic binomial family.
2323
#' @return A object produced by [stats::glm()].
24-
#' @examples
24+
#' @examplesIf !parsnip:::is_cran_check()
2525
#' #----------------------------------------------------------------------------
2626
#' # The same data set formatted three ways
2727
#'

R/linear_reg.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#'
3434
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("linear_reg")}
3535
#'
36-
#' @examples
36+
#' @examplesIf !parsnip:::is_cran_check()
3737
#' show_engines("linear_reg")
3838
#'
3939
#' linear_reg()

R/logistic_reg.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#'
4141
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("logistic_reg")}
4242
#'
43-
#' @examples
43+
#' @examplesIf !parsnip:::is_cran_check()
4444
#' show_engines("logistic_reg")
4545
#'
4646
#' logistic_reg()

R/mars.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#'
2626
#' @seealso \Sexpr[stage=render,results=rd]{parsnip:::make_seealso_list("mars")}
2727
#'
28-
#' @examples
28+
#' @examplesIf !parsnip:::is_cran_check()
2929
#' show_engines("mars")
3030
#'
3131
#' mars(mode = "regression", num_terms = 5)

0 commit comments

Comments
 (0)