cat_vars are not respected when specifying via set_data:
coxph_validator <- mlexperiments::MLCrossValidation$new(
learner = mlsurvlrnrs::LearnerSurvCoxPHCox$new(),
fold_list = validation_fold_list,
seed = seed,
ncores = n_cores,
return_models = TRUE
)
coxph_validator$performance_metric <- mlsurvlrnrs::c_index
coxph_validator$set_data(
x = train_x[, which(colnames(train_x) %in% cox_feature_cols)],
y = train_y,
cat_vars = ml_cat_vars[which(ml_cat_vars %in% cox_feature_cols)]
)
res_coxph <- coxph_validator$execute()
However, when setting them with learner_args, everything works fine:
coxph_validator$learner_args <- list(cat_vars = ml_cat_vars[which(ml_cat_vars %in% cox_feature_cols)])
cat_varsare not respected when specifying viaset_data:However, when setting them with
learner_args, everything works fine: