data(dataDIVAT2)
# The hyper-parameter grid needs to be more precise and the maximum number
# of iterations > 1000. We have reduced the arguments to respect examples requiring
# less than 5 seconds for packages on the CRAN.
tune.model <- tunePLANN(times="times", failures="failures", data=dataDIVAT2[1:300,],
cov.quanti=c("age"), cov.quali=c("hla", "retransplant", "ecd"), cv=3,
inter=1, size=c(16, 32), decay=0.01, maxit=50, MaxNWts=10000, seed=42)
tune.model$optimal # the optimal hyperparameters
tune.model$results # the C-index for the tested grid
Run the code above in your browser using DataLab