kfre is a Python library designed to estimate the risk of kidney failure in patients with chronic kidney disease (CKD) using the Kidney Failure Risk Equation (KFRE) developed by Tangri et al. It provides risk assessments over two distinct timelines: 2 years and 5 years. The library is tailored for healthcare professionals and researchers, enabling kidney failure risk predictions based on patient data. It supports predictions for both males and females and includes adjustments for individuals from North American and non-North American regions.
Prerequisites
Before you install kfre, ensure you have the following:
- Python: Python 3.7.4 or higher is required to run
kfre.
Additionally, kfre has the following package dependencies:
- numpy: version 1.18.5 or higher
- pandas: version 1.0.5 or higher
- matplotlib: version 3.2.2 or higher
- seaborn: version 0.10.1 or higher
- scikit-learn: version 0.23.1 or higher
- tqdm: version 4.0 or higher
Installation
You can install kfre directly from PyPI:
pip install kfre
Features
- KFRE risk estimation (4-, 6-, and 8-variable models) at 2- and 5-year horizons
- Unit conversion and uPCR-to-uACR estimation (see caveat below)
- CKD stage classification and outcome labeling
- Performance evaluation with bootstrap confidence intervals
Note on uACR estimation: the uPCR-to-uACR conversion is an approximation without universal consensus and carries measurement error; a directly measured uACR is preferred when available.
📄 Official Documentation
https://lshpaner.github.io/kfre
🌐 Author Website
⚖️ License
kfre is distributed under the MIT License. See LICENSE for more information.
📚 Citing kfre
If you use kfre in your research or projects, please consider citing it.
@software{shpaner_2024_11100222,
author = {Shpaner, Leonid},
title = {{kfre: A Python Library for Reproducing Kidney
Failure Risk Equations (KFRE)}},
month = may,
year = 2024,
publisher = {Zenodo},
version = {0.1.18},
doi = {10.5281/zenodo.11100222},
url = {https://doi.org/10.5281/zenodo.11100222}
}
Support
If you have any questions or issues with kfre, please open an issue on this GitHub repository.
Acknowledgements
The KFRE model developed by Tangri et al. has made significant contributions to kidney disease research.
The kfre library is based on the risk prediction models developed in the studies referenced below. Please refer to these studies for an in-depth understanding of the kidney failure risk prediction models used within this library.
Special thanks to Panayiotis Petousis, PhD, Obidiugwu Duru, MD, MS, Kenn B. Daratha, PhD, Keith C. Norris, MD, PhD, Katherine R. Tuttle MD, FASN, FACP, FNKF, Susanne B. Nicholas, MD, MPH, PhD, and Alex Bui, PhD. Their exceptional work on end-stage kidney disease has greatly inspired the creation of this library.
References
-
Ali, I., Donne, R. L., & Kalra, P. A. (2021). A validation study of the kidney failure risk equation in advanced chronic kidney disease according to disease aetiology with evaluation of discrimination, calibration and clinical utility. BMC Nephrology, 22(1), 194. https://doi.org/10.1186/s12882-021-02402-1 [1]_
-
Kang, M. W. (2024). [KFRE validation dataset, Asian cohort]. Unpublished dataset provided by personal communication, June 26, 2024. Department of Internal Medicine, Seoul National University College of Medicine, Seoul, Korea.
-
Kang, M. W., Tangri, N., Kim, Y. C., An, J. N., Lee, J., Li, L., Oh, Y. K., Kim, D. K., Joo, K. W., Kim, Y. S., Lim, C. S., & Lee, J. P. (2020). An independent validation of the kidney failure risk equation in an Asian population. Scientific Reports, 10, 12920. https://doi.org/10.1038/s41598-020-69715-3
-
Sumida, K., Nadkarni, G. N., Grams, M. E., Sang, Y., Ballew, S. H., Coresh, J., Matsushita, K., Surapaneni, A., Brunskill, N., Chadban, S. J., Chang, A. R., Cirillo, M., Daratha, K. B., Gansevoort, R. T., Garg, A. X., Iacoviello, L., Kayama, T., Konta, T., Kovesdy, C. P., Lash, J., Lee, B. J., Major, R. W., Metzger, M., Miura, K., Naimark, D. M. J., Nelson, R. G., Sawhney, S., Stempniewicz, N., Tang, M., Townsend, R. R., Traynor, J. P., Valdivielso, J. M., Wetzels, J., Polkinghorne, K. R., & Heerspink, H. J. L. (2020). Conversion of urine protein-creatinine ratio or urine dipstick protein to urine albumin-creatinine ratio for use in chronic kidney disease screening and prognosis. Annals of Internal Medicine, 173 (6), 426-435. https://doi.org/10.7326/M20-0529
-
Tangri, N., Grams, M. E., Levey, A. S., Coresh, J., Appel, L. J., Astor, B. C., Chodick, G., Collins, A. J., Djurdjev, O., Elley, C. R., Evans, M., Garg, A. X., Hallan, S. I., Inker, L. A., Ito, S., Jee, S. H., Kovesdy, C. P., Kronenberg, F., Heerspink, H. J. L., Marks, A., Nadkarni, G. N., Navaneethan, S. D., Nelson, R. G., Titze, S., Sarnak, M. J., Stengel, B., Woodward, M., Iseki, K., & for the CKD Prognosis Consortium. (2016). Multinational assessment of accuracy of equations for predicting risk of kidney failure: A meta-analysis. JAMA, 315 (2), 164–174. https://doi.org/10.1001/jama.2015.18202
-
Tangri, N., Stevens, L. A., Griffith, J., Tighiouart, H., Djurdjev, O., Naimark, D., Levin, A., & Levey, A. S. (2011). A predictive model for progression of chronic kidney disease to kidney failure. JAMA, 305 (15), 1553-1559. https://doi.org/10.1001/jama.2011.451
.. [1] This article is licensed under a Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.
Metadata
Release files for kfre 0.1.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kfre-0.1.18.tar.gz | 38.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kfre-0.1.18-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.8 kB
Release files / kfre-0.1.18.tar.gz
| Download URL | kfre-0.1.18.tar.gz |
|---|---|
| Size | 38.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59bd9b3568cb7509fe532e54e2615471d9198dba84ae15217502d35b10f64599
|
|
BLAKE2b-256 checksum How to use checksums |
208821cde6e8e12c55feeb6f944e3dad6e7a445adada6a2a0e16c472fba61971
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / kfre-0.1.18-py3-none-any.whl
| Download URL | kfre-0.1.18-py3-none-any.whl |
|---|---|
| Size | 27.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcb0b92180c4a8779965e4fc09c128117a042244af42cdcdcd55085f8648dfdf
|
|
BLAKE2b-256 checksum How to use checksums |
586b884b9bb67dd53743a44ca7ab4e2cc3285373f372180469638c0c6de61599
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|