Closed
Description
library(tidymodels)
library(hardhat)
sparse_bp <- default_recipe_blueprint(composition = "dgCMatrix")
rec_spec <-
recipe(mpg ~ ., data = mtcars)
xgb_spec <-
boost_tree(mode = "regression") %>%
set_engine("xgboost")
wf_sparse <-
workflow() %>%
add_recipe(rec_spec, blueprint = sparse_bp) %>%
add_model(xgb_spec)
fit_sparse <- fit(wf_sparse, mtcars)
augment(fit_sparse, new_data = mtcars)
#> Error in `dplyr::bind_cols()`:
#> ! Input must be a vector, not a <dgCMatrix> object.
Created on 2022-03-25 by the reprex package (v2.0.1)