| coxtime | R Documentation | 
Cox-Time fits a neural network based on the Cox PH with possibly time-dependent effects.
coxtime(
  formula = NULL,
  data = NULL,
  reverse = FALSE,
  time_variable = "time",
  status_variable = "status",
  x = NULL,
  y = NULL,
  frac = 0,
  standardize_time = FALSE,
  log_duration = FALSE,
  with_mean = TRUE,
  with_std = TRUE,
  activation = "relu",
  num_nodes = c(32L, 32L),
  batch_norm = TRUE,
  dropout = NULL,
  device = NULL,
  shrink = 0,
  early_stopping = FALSE,
  best_weights = FALSE,
  min_delta = 0,
  patience = 10L,
  batch_size = 256L,
  epochs = 1L,
  verbose = FALSE,
  num_workers = 0L,
  shuffle = TRUE,
  ...
)
| formula | 
 | 
| data | 
 | 
| reverse | 
 | 
| time_variable | 
 | 
| status_variable | 
 | 
| x | 
 | 
| y | 
 | 
| frac | 
 | 
| standardize_time | 
 | 
| log_duration | 
 | 
| with_mean | 
 | 
| with_std | 
 | 
| activation | 
 | 
| num_nodes,batch_norm,dropout | 
 | 
| device | 
 | 
| shrink | 
 | 
| early_stopping,best_weights,min_delta,patience | 
 | 
| batch_size | 
 | 
| epochs | 
 | 
| verbose | 
 | 
| num_workers | 
 | 
| shuffle | 
 | 
| ... | 
 | 
Implemented from the pycox Python package via reticulate.
Calls pycox.models.Coxtime.
An object inheriting from class coxtime.
An object of class survivalmodel.
Kvamme, H., Borgan, Ø., & Scheel, I. (2019). Time-to-event prediction with neural networks and Cox regression. Journal of Machine Learning Research, 20(129), 1–30.
## Not run: 
if (requireNamespaces("reticulate")) {
  # all defaults
  coxtime(data = simsurvdata(50))
  # common parameters
  coxtime(data = simsurvdata(50), frac = 0.3, activation = "relu",
    num_nodes = c(4L, 8L, 4L, 2L), dropout = 0.1, early_stopping = TRUE, epochs = 100L,
    batch_size = 32L)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.