### Tuning the hyper parameter for a deepAFT model:
#### cross-validation take a long time to run.
# \donttest{
set.seed(101)
### define model layers
model = dNNmodel(units = c(4, 3, 1), activation = c("elu", "sigmoid", "sigmoid"),
input_shape = 3)
x = matrix(runif(45), nrow = 15, ncol = 3)
time = exp(x[, 1])
status = rbinom(15, 1, 0.5)
y = Surv(time, status)
ctl = dnnControl(epochs = 30)
hyperTuning(x, y, model, method = "BuckleyJames", K = 2, R = 2, lower = ctl)
# }
Run the code above in your browser using DataLab