We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe721f6 commit 145bac2Copy full SHA for 145bac2
NEWS.md
@@ -1,5 +1,7 @@
1
# parsnip (development version)
2
3
+* Fixed bug where sparse data was being coerced to non-sparse format doing `predict()`.
4
+
5
* `augment()` now works for censored regression models.
6
7
# parsnip 1.1.0
R/predict.R
@@ -426,6 +426,10 @@ prepare_data <- function(object, new_data) {
426
new_data <- new_data[, colnames(new_data) != "(Intercept)", drop = FALSE]
427
}
428
429
+ if (allow_sparse(object) && inherits(new_data, "dgCMatrix")) {
430
+ return(new_data)
431
+ }
432
433
fit_interface <- object$spec$method$fit$interface
434
switch(
435
fit_interface,
0 commit comments