You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered the following error message "Error in vecdist$wrappedModels()[[i]]: wrong arguments for subsetting an environment" when applying model_survshap function with aft_weibull model from mlr3. This has not been a problem with other models/learners from mlr3 in my experience.
Any insight and suggestion on how this may be debugged would be very much appreciated!
library(mlr3)
library(mlr3extralearners)
library(mlr3pipelines)
library('mlr3proba')
library(survival)
library(survex)
lung= tsk('lung')$data()
aft=lrn('surv.parametric')
aft$train(tsk('lung'))
class(aft) = c(class(aft), 'LearnerSurv')
aft_exp_lung= explain(aft,
data=lung[, -c(1,2)],
y=Surv(lung$time, lung$status),
label='aft')
#> Preparation of a new explainer is initiated #> -> model label : aft #> -> data : 168 rows 7 cols #> -> target variable : 168 values ( 121 events and 47 censored ) #> -> times : 50 unique time points , min = 8 , median survival time = 320 , max = 918 #> -> times : ( generated from y as uniformly distributed survival quantiles based on Kaplan-Meier estimator ) #> -> predict function : predict_newdata()$crank will be used ( �[33m default �[39m ) #> -> predict survival function : predict_newdata()$distr$survival will be used ( �[33m default �[39m ) #> -> predict cumulative hazard function : predict_newdata()$distr$cumHazard will be used ( �[33m default �[39m ) #> -> model_info : package mlr3proba , ver. 0.6.3 , task survival ( �[33m default �[39m ) #> A new explainer has been created!kernelSHAP_aft_lung= model_survshap(explainer=aft_exp_lung,
calculation_method='kernelshap',
aggregation_method='integral',
output_type='risk')
#> Error in vecdist$wrappedModels()[[i]]: wrong arguments for subsetting an environment
Hi survex team,
I encountered the following error message "Error in vecdist$wrappedModels()[[i]]: wrong arguments for subsetting an environment" when applying model_survshap function with aft_weibull model from mlr3. This has not been a problem with other models/learners from mlr3 in my experience.
Any insight and suggestion on how this may be debugged would be very much appreciated!
Created on 2024-09-19 by the reprex package (v2.0.1)
Session info
The text was updated successfully, but these errors were encountered: