surv_model_info {survex} | R Documentation |
Extract additional information from the model
Description
This generic function let user extract base information about model. The function returns a named list of class model_info
that
contain information about package of model, version and task type. For wrappers like mlr
or parsnip
both, package and wrapper
information are stored
Usage
surv_model_info(model, ...)
## S3 method for class 'coxph'
surv_model_info(model, ...)
## S3 method for class 'rfsrc'
surv_model_info(model, ...)
## S3 method for class 'ranger'
surv_model_info(model, ...)
## S3 method for class 'model_fit'
surv_model_info(model, ...)
## S3 method for class 'cph'
surv_model_info(model, ...)
## S3 method for class 'LearnerSurv'
surv_model_info(model, ...)
## S3 method for class 'sksurv'
surv_model_info(model, ...)
## S3 method for class 'flexsurvreg'
surv_model_info(model, ...)
## Default S3 method:
surv_model_info(model, ...)
Arguments
model |
|
... |
|
Details
Currently supported packages are:
class
coxph
- Cox proportional hazards regression model created with survival packageclass
model_fit
- models created with parsnip packageclass
ranger
- random survival forest models created with ranger packageclass
rfsrc
- random forest models created with randomForestSRC package
Value
A named list of class model_info
Examples
library(survival)
library(survex)
cph <- survival::coxph(survival::Surv(time, status) ~ .,
data = veteran,
model = TRUE, x = TRUE, y = TRUE
)
surv_model_info(cph)
library(ranger)
rsf_ranger <- ranger::ranger(survival::Surv(time, status) ~ .,
data = veteran,
num.trees = 50, mtry = 3, max.depth = 5
)
surv_model_info(rsf_ranger)
[Package survex version 1.2.0 Index]