Closed hfrick closed 1 year ago
Something is off in this this glmnet workflow:
library(tidymodels) library(prodlim) library(censored) #> Loading required package: survival set.seed(1) sim_tr <- SimSurv(500) %>% mutate(event_time = Surv(time, event)) %>% select(event_time, X1, X2) new_x <- sim_tr[1:5, 2:3] glmn_spec <- proportional_hazards(penalty = .01) %>% set_engine("glmnet") glmn_wflow <- workflow() %>% add_model(glmn_spec) %>% add_formula(event_time ~ X1 + X2) glmn_wflow_fit <- fit(glmn_wflow, data = sim_tr) predict(glmn_wflow_fit, new_data = new_x) #> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'as.matrix': Cholmod error 'X and/or Y have wrong dimensions' at file ../MatrixOps/cholmod_sdmult.c, line 88
Created on 2023-04-26 with reprex v2.0.2
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Something is off in this this glmnet workflow:
Created on 2023-04-26 with reprex v2.0.2