Predict Method for DNNSurv
Predicted values from a fitted object of class dnnsurv.
## S3 method for class 'dnnsurv' predict( object, newdata, batch_size = 32L, verbose = 0L, steps = NULL, callbacks = NULL, type = c("survival", "risk", "all"), distr6 = FALSE, ... )
object |
|
newdata |
|
batch_size |
|
verbose |
|
steps |
|
callbacks |
|
type |
( |
distr6 |
|
... |
|
A numeric
if type = "risk"
, a distr6::VectorDistribution()
(if distr6 = TRUE
)
and type = "survival"
; a matrix
if (distr6 = FALSE
) and type = "survival"
where
entries are survival probabilities with rows of observations and columns are time-points;
or a list combining above if type = "all"
.
if (requireNamespaces(c("keras", "pseudo"))) fit <- dnnsurv(data = simsurvdata(10)) # predict survival matrix and relative risks predict(fit, simsurvdata(10), type = "all") # return as distribution if (requireNamespaces("distr6")) { predict(fit, simsurvdata(10), distr6 = TRUE) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.