個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Machine Learning for Competing Risks in mlr3
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
mlr3cmprsk extends the mlr3 ecosystem for
machine learning with competing risks right-censored survival
outcomes. It provides task, learner, prediction, and measure
abstractions that support model training, resampling, benchmarking, and
evaluation within the mlr3 framework.
Compare a Fine-Gray model with the Aalen-Johansen baseline using 3-fold
CV on the built-in pbc task.檢視完整 README ↗Package website: mlr3cmprsk
mlr3cmprsk extends the mlr3 ecosystem for
machine learning with competing risks right-censored survival
outcomes. It provides task, learner, prediction, and measure
abstractions that support model training, resampling, benchmarking, and
evaluation within the mlr3 framework.
Install the development version from GitHub:
# install.packages("pak")
pak::pak("mlr-org/mlr3cmprsk")
Compare a Fine-Gray model with the Aalen-Johansen baseline using 3-fold
CV on the built-in pbc task.
library(mlr3cmprsk)
set.seed(42L)
task = tsk("pbc")
task$select(c("age", "chol", "albumin", "bili"))
# Stratify by event status so all splits keep all available causes
task$set_col_roles(cols = "status", add_to = "stratum")
learners = lrns(c("cmprsk.fg", "cmprsk.aalen"))
bm_grid = benchmark_grid(task, learners, rsmp("cv", folds = 3L))
bm = benchmark(bm_grid)
measures = list(
# AUC(t = 100)
msr("cmprsk.auc", time = 100, id = "auc_t100"),
# BS(t = 100)
msr("cmprsk.brier", time = 100, id = "bs_t100"),
# IBS: 100 equally spaced times from 0 to each test fold's 90th follow-up percentile
msr("cmprsk.ibs", id = "ibs")
)
# By default, each measure averages the cause-specific scores, with weights
# equal to the observed event frequencies in each test fold
bm$score(measures)[, .(task_id, learner_id, iteration, auc_t100, bs_t100, ibs)]
## task_id learner_id iteration auc_t100 bs_t100 ibs
## 1: pbc cmprsk.fg 1 0.7813865 0.1564736 0.1088478
## 2: pbc cmprsk.fg 2 0.7663073 0.1750273 0.1155973
## 3: pbc cmprsk.fg 3 0.8390308 0.1371346 0.1028685
## 4: pbc cmprsk.aalen 1 0.5000000 0.2182071 0.1487853
## 5: pbc cmprsk.aalen 2 0.5000000 0.2200391 0.1585370
## 6: pbc cmprsk.aalen 3 0.5000000 0.2181846 0.1609251
All currently available measures use cumulative incidence function
(CIF) predictions and are calculated with riskRegression::Score();
the Integrated Brier Score (IBS) is the default measure for competing
risks tasks.
| ID | Measure | Category | Prediction Type |
|---|---|---|---|
cmprsk.ibs | Integrated Brier score | Scoring Rule | cif |
cmprsk.brier | Brier score at a specified time | Scoring Rule | cif |
cmprsk.auc | Time-dependent AUC at a specified time | Discrimination | cif |
The package includes two learners, both of which return CIF predictions for every cause.
| ID | Learner | Underlying Package |
|---|---|---|
cmprsk.aalen | Aalen-Johansen estimator | survival::survfit() |
cmprsk.fg | Fine-Gray subdistribution hazards model | cmprsk::crr() |
For additional models, see the available
list
in mlr3extralearners, including CoxBoost (cmprsk.coxboost) and
random forests (cmprsk.rfsrc).
We welcome contributions and pull requests to add new competing risks
learners in mlr3extralearners.
If you use mlr3cmprsk in your work, please cite it using the following
BibTeX entry:
@Manual{mlr3cmprsk,
title = {mlr3cmprsk: Competing Risks Machine Learning for 'mlr3'},
author = {John Zobolas and Andreas Bender},
year = {2026},
note = {R package version 0.0.7, https://github.com/mlr-org/mlr3cmprsk},
url = {https://mlr3cmprsk.mlr-org.com},
}
This project follows a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.