Skip to contents

This function extracts model information from a neural network trained with the survivalmodels package.

Usage

extract_model(x, path = NULL, num_basehazard = 200L)

# S3 method for class 'coxtime'
extract_model(x, path = NULL, num_basehazard = 200L)

# S3 method for class 'deephit'
extract_model(x, path = NULL, ...)

# S3 method for class 'deepsurv'
extract_model(x, path = NULL, num_basehazard = 200L)

Arguments

x

A survivalmodels object, i.e., survivalmodels::deephit, survivalmodels::coxtime, or survivalmodels::deepsurv.

path

A string specifying the path to save the extracted model. If NULL, the model is not saved. Default is NULL.

num_basehazard

An integer specifying the number of points of the baseline hazard to compute. Default is 200L. This argument is only used for coxtime and deepsurv models.

...

Unused arguments.