comprisk: A scikit-learn-compatible Python toolkit for competing-risks survival analysis

· Source: stat.ML updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Data Science & Analytics, Software Development & Engineering · Depth: Advanced, medium

Summary

comprisk is a scikit-learn-compatible Python toolkit designed for competing-risks survival analysis, addressing the issue where standard methods yield biased absolute-risk estimates in medical time-to-event data. Released in July 2026, it consolidates canonical methods like a scalable competing-risks random survival forest, Fine–Gray subdistribution-hazard regression (including penalized variants), cause-specific Cox regression, the Aalen–Johansen CIF estimator, and Gray's $K$-sample test. The package also includes competing-risks-aware model evaluation metrics such as IPCW time-dependent AUC and Brier score, cause-specific concordance indices, and calibration curves. Its histogram-based, numba-compiled split kernel fits 10–22$ imes$ faster than randomForestSRC, scaling to $n=10^{6}$ on a consumer CPU, and is numerically validated against established R reference implementations.

Key takeaway

For data scientists and epidemiologists building risk-prediction models with competing-risks outcomes, comprisk offers a robust, scikit-learn-compatible solution within Python. You can now perform correct and scalable competing-risks analysis, including advanced forest models and validated regression techniques, without fragmenting your workflow with Python-to-R round trips. This streamlines reproducible research and ensures consistent results with established literature.

Key insights

Correct competing-risks analysis requires specialized methods to avoid biased absolute-risk estimates in time-to-event data.

Principles

Method

comprisk employs a histogram-based, numba-compiled split kernel for its random survival forest, enabling sub-linear wall-time growth and parallel tree growth across cores.

In practice

Topics

Code references

Best for: AI Engineer, AI Scientist, Data Scientist, Research Scientist, Machine Learning Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by stat.ML updates on arXiv.org.