Predicted values from a fitted pycox ANN.
# S3 method for pycox
predict(
object,
newdata,
batch_size = 256L,
num_workers = 0L,
interpolate = FALSE,
inter_scheme = c("const_hazard", "const_pdf"),
sub = 10L,
type = c("survival", "risk", "all"),
...
)
A numeric
if type = "risk"
, a matrix
if type = "survival"
where
entries are survival probabilities with rows of observations and columns are time-points.
(pycox(1))
Object of class inheriting from "pycox"
.
(data.frame(1))
Testing data of data.frame
like object, internally is coerced with stats::model.matrix()
.
If missing then training data from fitted object is used.
(integer(1))
Passed to pycox.models.X.fit
, elements in each batch.
(integer(1))
Passed to pycox.models.X.fit
, number of workers used in the dataloader.
(logical(1))
For models deephit
and loghaz
, should predictions be linearly interpolated? Ignored
for other models.
(character(1))
If interpolate
is TRUE
then the scheme for interpolation, see
reticulate::py_help(py_help(pycox$models$DeepHitSingle$interpolate))
for further
details.
(integer(1))
If interpolate
is TRUE
or model is loghaz
, number of sub-divisions for interpolation.
See reticulate::py_help(py_help(pycox$models$DeepHitSingle$interpolate))` for further
details.
(character(1)
)
Type of predicted value. Choices are survival probabilities over all time-points in training
data ("survival"
) or a relative risk ranking ("risk"
), which is the negative mean survival
time so higher rank implies higher risk of event, or both ("all"
).
ANY
Currently ignored.