Skip to content

Instantly share code, notes, and snippets.

@RaphaelS1
Last active May 9, 2023 21:32
Show Gist options
  • Save RaphaelS1/53f602304b9d19124372c9e0d0130155 to your computer and use it in GitHub Desktop.
Save RaphaelS1/53f602304b9d19124372c9e0d0130155 to your computer and use it in GitHub Desktop.
## select holdout as the resampling strategy
resampling <- rsmp("cv", folds = 3)
## add KM and CPH
learners <- c(learners, lrns(c("surv.kaplan", "surv.coxph")))
design <- benchmark_grid(tasks, learners, resampling)
bm <- benchmark(design)
## Aggreggate with Harrell's C and Integrated Graf Score
msrs <- msrs(c("surv.cindex", "surv.graf"))
bm$aggregate(msrs)[, c(3, 4, 7, 8)]
@RaphaelS1
Copy link
Author

Great! Strange I've never seen that error before... Looks like it's in the underlying {pycox} implementation. Maybe try reinstalling pycox?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment