Package index
Feature attribution methods
All implemented feature attribution methods for the survival neural networks ‘DeepHit’, ‘DeepSurv’, and ‘CoxTime’.
-
surv_grad()
- Calculate the Gradient of the Survival Function
-
surv_smoothgrad()
- Calculate the SmoothGrad values of the Survival Function
-
surv_intgrad()
- Calculate the Integrated Gradients of the Survival Function
-
surv_gradSHAP()
- Calculate the GradSHAP values of the Survival Function
Creating explainer object
The basic building block of the package is the ‘explainer’ object which contains the model and the data needed for the feature attribution methods.
-
explain()
- Explain a model
Extracting a model from survivalmodels
The ‘extract_model’ function extracts the model from the ‘survivalmodels’ object and returns all necessary information for the survival model to be explained.
-
extract_model()
- Extract model information from a
survivalmodels
object
Plotting and printing
The ‘plot’ function is used to plot the feature attribution results in different ways. The ‘plot’ function is a generic function that calls the appropriate method depending on the argument ‘type’. The ‘print’ function is used to print extracted model, explainers, and feature attribution results..
-
plot(<surv_result>)
plot_force()
plot_pred()
plot_attr()
plot_contr()
- Plot Methods for Survival Attribution Results
-
print(<surv_result>)
- Print function for surv_result objects
-
print(<explainer_coxtime>)
print(<explainer_deepsurv>)
print(<explainer_deephit>)
- Custom print method for explainer objects
-
print(<extracted_survivalmodels_coxtime>)
print(<extracted_survivalmodels_deepsurv>)
print(<extracted_survivalmodels_deephit>)
- Print method for extracted pycox survival model
Data transformation
These functions are used to transform the data into a data.frame or a data.table format.
-
as.data.frame(<surv_result>)
as.data.table.surv_result()
- Convert survival attribution results to a data.frame