Skip to content

Commit 7718d67

Browse files
committed
document a little more for sparse matrix input
1 parent 604bece commit 7718d67

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# parsnip (development version)
22

3+
* `fit_xy()` can now take dgCMatrix input for `x` argument (#1121).
34

45
* `fit_xy()` currently raises an error for `gen_additive_mod()` model specifications as the default engine (`"mgcv"`) specifies smoothing terms in model formulas. However, some engines specify smooths via additional arguments, in which case the restriction on `fit_xy()` is excessive. parsnip will now only raise an error when fitting a `gen_additive_mod()` with `fit_xy()` when using the `"mgcv"` engine (#775).
56

R/fit.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@
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+
#'
59+
#' Sparse data is supported, with the use of the `x` argument in `fit_xy()`. See
60+
#' `allow_sparse_x` column of [parsnip::get_encoding()] for sparse input
61+
#' compatibility.
62+
#'
5863
#' @examplesIf !parsnip:::is_cran_check()
5964
#' # Although `glm()` only has a formula interface, different
6065
#' # methods for specifying the model can be used

man/fit.Rd

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/helper-objects.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ sparse_hotel_rates <- function() {
5050

5151
res <- as.matrix(res)
5252
Matrix::Matrix(res, sparse = TRUE)
53-
}
53+
}

0 commit comments

Comments
 (0)