Skip to content

Commit b08f4d5

Browse files
committed
chore: merged upstream changes into kapsner-fork
2 parents f88f794 + d389a65 commit b08f4d5

File tree

87 files changed

+6242
-2024
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+6242
-2024
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ jobs:
2727
needs: coverage
2828

2929
- name: Test coverage
30-
run: covr::codecov(quiet = FALSE, function_exclusions=c("surv_model_info\\.", "explain.LearnerSurv", "loss_adapt_mlr3proba"))
30+
run: covr::codecov(quiet = FALSE, function_exclusions=c("surv_model_info\\.", "explain.LearnerSurv", "loss_adapt_mlr3proba", "explain.sksurv"))
3131
shell: Rscript {0}

DESCRIPTION

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Package: survex
22
Title: Explainable Machine Learning in Survival Analysis
3-
Version: 1.0.0.9001
3+
Version: 1.1.1
44
Authors@R:
55
c(
66
person("Mikołaj", "Spytek", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7111-2286")),
77
person("Mateusz", "Krzyziński", role = c("aut"), comment = c(ORCID = "0000-0001-6143-488X")),
8+
person("Sophie", "Langbein", role = c("aut")),
89
person("Hubert", "Baniecki", role = c("aut"), comment = c(ORCID = "0000-0001-6661-5364")),
910
person("Przemyslaw", "Biecek", role = c("aut"), comment = c(ORCID = "0000-0001-8423-1823"))
1011
)
@@ -22,27 +23,29 @@ RoxygenNote: 7.2.3
2223
Depends: R (>= 3.5.0)
2324
Imports:
2425
DALEX (>= 2.2.1),
25-
ggplot2,
26+
ggplot2 (>= 3.4.0),
2627
kernelshap,
2728
treeshap,
2829
pec,
2930
survival,
30-
patchwork,
31-
data.table
31+
patchwork
3232
Suggests:
33-
censored,
33+
censored (>= 0.2.0),
3434
covr,
35+
flexsurv,
3536
gbm,
3637
generics,
3738
glmnet,
3839
ingredients,
39-
knitr,
40+
knitr (>= 1.42),
4041
mboost,
4142
parsnip,
4243
progressr,
4344
randomForestSRC,
4445
ranger,
46+
reticulate,
4547
rmarkdown,
48+
rms,
4649
testthat (>= 3.0.0),
4750
withr,
4851
xgboost

NAMESPACE

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,28 @@
33
S3method(explain,LearnerSurv)
44
S3method(explain,coxph)
55
S3method(explain,default)
6+
S3method(explain,flexsurvreg)
67
S3method(explain,model_fit)
78
S3method(explain,ranger)
89
S3method(explain,rfsrc)
10+
S3method(explain,sksurv)
11+
S3method(model_diagnostics,surv_explainer)
912
S3method(model_parts,default)
1013
S3method(model_parts,surv_explainer)
1114
S3method(model_performance,default)
1215
S3method(model_performance,surv_explainer)
1316
S3method(model_profile,default)
1417
S3method(model_profile,surv_explainer)
15-
S3method(plot,feature_importance_explainer)
18+
S3method(model_profile_2d,surv_explainer)
19+
S3method(model_survshap,surv_explainer)
20+
S3method(plot,aggregated_surv_shap)
21+
S3method(plot,model_diagnostics_survival)
1622
S3method(plot,model_parts_survival)
1723
S3method(plot,model_performance_survival)
24+
S3method(plot,model_profile_2d_survival)
1825
S3method(plot,model_profile_survival)
1926
S3method(plot,predict_parts_survival)
2027
S3method(plot,predict_profile_survival)
21-
S3method(plot,surv_ceteris_paribus)
2228
S3method(plot,surv_feature_importance)
2329
S3method(plot,surv_lime)
2430
S3method(plot,surv_model_performance)
@@ -29,6 +35,8 @@ S3method(predict_parts,default)
2935
S3method(predict_parts,surv_explainer)
3036
S3method(predict_profile,default)
3137
S3method(predict_profile,surv_explainer)
38+
S3method(print,model_diagnostics_survival)
39+
S3method(print,model_profile_2d_survival)
3240
S3method(print,model_profile_survival)
3341
S3method(print,surv_ceteris_paribus)
3442
S3method(print,surv_feature_importance)
@@ -38,15 +46,18 @@ S3method(surv_model_info,LearnerSurv)
3846
S3method(surv_model_info,coxph)
3947
S3method(surv_model_info,cph)
4048
S3method(surv_model_info,default)
49+
S3method(surv_model_info,flexsurvreg)
4150
S3method(surv_model_info,model_fit)
4251
S3method(surv_model_info,ranger)
4352
S3method(surv_model_info,rfsrc)
53+
S3method(surv_model_info,sksurv)
4454
export(brier_score)
4555
export(c_index)
4656
export(cd_auc)
4757
export(cumulative_hazard_to_survival)
4858
export(explain)
4959
export(explain_survival)
60+
export(extract_predict_survshap)
5061
export(integrated_brier_score)
5162
export(integrated_cd_auc)
5263
export(loss_adapt_mlr3proba)
@@ -56,9 +67,12 @@ export(loss_integrated_brier_score)
5667
export(loss_one_minus_c_index)
5768
export(loss_one_minus_cd_auc)
5869
export(loss_one_minus_integrated_cd_auc)
70+
export(model_diagnostics)
5971
export(model_parts)
6072
export(model_performance)
6173
export(model_profile)
74+
export(model_profile_2d)
75+
export(model_survshap)
6276
export(predict_parts)
6377
export(predict_profile)
6478
export(risk_from_chf)
@@ -68,7 +82,6 @@ export(survival_to_cumulative_hazard)
6882
export(theme_default_survex)
6983
export(theme_vertical_default_survex)
7084
export(transform_to_stepfunction)
71-
import(data.table)
7285
import(ggplot2)
7386
import(patchwork)
7487
import(survival)
@@ -77,18 +90,25 @@ importFrom(DALEX,theme_drwhy)
7790
importFrom(DALEX,theme_drwhy_vertical)
7891
importFrom(DALEX,theme_ema)
7992
importFrom(DALEX,theme_ema_vertical)
93+
importFrom(graphics,par)
8094
importFrom(stats,aggregate)
8195
importFrom(stats,as.formula)
96+
importFrom(stats,ave)
97+
importFrom(stats,cmdscale)
98+
importFrom(stats,ecdf)
8299
importFrom(stats,median)
83100
importFrom(stats,model.frame)
84101
importFrom(stats,model.matrix)
85102
importFrom(stats,na.omit)
86103
importFrom(stats,optim)
87104
importFrom(stats,predict)
105+
importFrom(stats,qnorm)
88106
importFrom(stats,quantile)
89107
importFrom(stats,reorder)
108+
importFrom(stats,reshape)
90109
importFrom(stats,rnorm)
91110
importFrom(stats,stepfun)
111+
importFrom(stats,xtabs)
92112
importFrom(utils,head)
93113
importFrom(utils,stack)
94114
importFrom(utils,tail)

NEWS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
# survex (development)
1+
# survex 1.1.0
22

3-
* Fix not being able to plot or print SurvLIME results for the cph model sometimes. ([#72](https://github.com/ModelOriented/survex/issues/72))
3+
* fixed not being able to plot or print SurvLIME results for the cph model sometimes. ([#72](https://github.com/ModelOriented/survex/issues/72))
4+
* added global explanations via the SurvSHAP(t) method (see `model_survshap()` function)
5+
* added plots for global SurvSHAP(t) explanations (see `plot.aggregated_surv_shap()`)
6+
* added Accumulated Local Effects (ALE) explanations (see `model_profile(..., type = "accumulated")`)
7+
* added 2-dimensional PDP and ALE plots (see `model_profile_2d()` function)
8+
* added `plot(..., geom="variable")` function for plotting PDP and ALE explanations without the time dimension
9+
* new explainers: for `flexsurv` models and for Python scikit-survival models (can be used with `reticulate`)
10+
* new plot type for `model_survshap()` - curves (with functional box plot)
11+
* added diagnostic explanations - residual analysis (see `model_diagnostics()` function)
12+
* added new times generation method `"survival_quantiles"` and setting it as default (see `explain()`)
13+
* made improvements on the vignettes for the package (see `vignette("pdp")` and `vignette("global-survshap")`)
14+
* increased the test coverage of the package
15+
* reduced the number of expensive `requireNamespace()` calls ([#83](https://github.com/ModelOriented/survex/issues/83))
416

517
# survex 1.0.0
618

0 commit comments

Comments
 (0)