-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#' <% measure = suppressWarnings(get(fullname)$new()) %> | ||
#' | ||
#' @examples | ||
#' library(mlr3) | ||
#' | ||
#' # Define a survival Task | ||
#' task = tsk("lung") | ||
#' | ||
#' # Create train and test set | ||
#' part = partition(task) | ||
#' | ||
#' # Train Cox learner on the train set | ||
#' cox = lrn("surv.coxph") | ||
#' cox$train(task, row_ids = part$train) | ||
#' | ||
#' # Make predictions for the test set | ||
#' p = cox$predict(task, row_ids = part$test) | ||
#' | ||
#' # <%=improper_id%>, G(t) calculated using the test set | ||
#' p$score(msr("<%=measure$id%>")) | ||
#' | ||
#' # <%=improper_id%>, G(t) calculated using the train set (always recommended) | ||
#' p$score(msr("<%=measure$id%>"), task = task, train_set = part$train) | ||
#' | ||
#' # <%=improper_id%>, ERV score (comparing with KM baseline) | ||
#' p$score(msr("<%=measure$id%>", ERV = TRUE), task = task, train_set = part$train) | ||
#' | ||
#' # <%=improper_id%> at specific time point | ||
#' p$score(msr("<%=measure$id%>", times = 365), task = task, train_set = part$train) | ||
#' | ||
#' # <%=improper_id%> at multiple time points (integrated) | ||
#' p$score(msr("<%=measure$id%>", times = c(125, 365, 450), integrated = TRUE), task = task, train_set = part$train) | ||
#' | ||
#' # <%=improper_id%>, use time cutoff | ||
#' p$score(msr("<%=measure$id%>", t_max = 700), task = task, train_set = part$train) | ||
#' | ||
#' # <%=improper_id%>, use time cutoff and also remove observations | ||
#' p$score(msr("<%=measure$id%>", t_max = 700, remove_obs = TRUE), task = task, train_set = part$train) | ||
#' | ||
#' # <%=improper_id%>, use time cutoff corresponding to specific proportion of censoring on the test set | ||
#' p$score(msr("<%=measure$id%>", p_max = 0.8), task = task, train_set = part$train) | ||
#' | ||
#' # <%=proper_id%>, G(t) calculated using the train set | ||
#' p$score(msr("<%=measure$id%>", proper = TRUE), task = task, train_set = part$train) | ||
#' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.