0
$\begingroup$

In this project, I am trying to tune the parameters(especially the step number parameter) of the CoxBoost model for survival analysis. I have more features than samples and many features are highly correlated. So I made a filtering function which allows me to do an initial feature selection. The next step, I want to find the optimal parameter for my model. How could I achieve that?

Codes without initial selection

ps = makeParamSet(
  makeDiscreteParam("stepno", values = c(50,70,100,150,200))
)
ctrl = makeTuneControlGrid()
rdesc=makeResampleDesc("RepCV",folds=3L,reps=20L, predict = "both")
 res = tuneParams("surv.CoxBoost", task = surv.task, resampling =
 rdesc, par.set = ps, control = ctrl)

Codes with initial selection

ps = makeParamSet(
  makeDiscreteParam("stepno", values = c(50,70,100,150,200))
)
ctrl = makeTuneControlGrid()
rdesc=makeResampleDesc("RepCV",folds=3L,reps=20L, predict = "both")
lrn = makeTuneWrapper("surv.CoxBoost", resampling = rdesc,
par.set = ps, control = ctrl, show.info = FALSE)
lrn1 = makeFilterWrapper(learner = lrn, fw.method = 
"uni.cor.filter",fw.threshold=0.5)
res = tuneParams(lrn1, task = surv.task, resampling =
rdesc, par.set = ps, control = ctrl)
$\endgroup$
0
$\begingroup$
lrn = makeFilterWrapper("surv.CoxBoost", fw.method = "uni.cor.filter",fw.threshold=0.5)
lrn1 = makeTuneWrapper(lrn, 
         resampling = makeResampleDesc("RepCV",folds=3L,reps=20L),
         par.set = makeParamSet(
                    makeDiscreteParam("stepno", values = c(50,70,100,150,200))), 
         control = makeTuneControlGrid(), 
         show.info = T)
r = resample(lrn1, surv.task, 
         resampling = makeFixedHoldoutInstance(train.inds = 1:74, test.inds = 1:74, 
                        size = 74), 
         models = TRUE)

Here, when doing the outer resampling, I use the whole data as your train dataset and test dataset. In this way, we can get a comparison among tuning parameters.

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.