Data loader for common datasets in Survival Analysis.
Project description
survival-datasets
A simple data loader for the most common datasets in Survival Analysis. Currently the following are included:
- Veterans Lung Cancer (https://scikit-survival.readthedocs.io/en/stable/api/generated/sksurv.datasets.load_veterans_lung_cancer.html)
- German Breast Cancer Study Group (GBSG2) (https://scikit-survival.readthedocs.io/en/stable/api/generated/sksurv.datasets.load_gbsg2.html)
- AIDS dataset (https://scikit-survival.readthedocs.io/en/stable/api/generated/sksurv.datasets.load_aids.html)
- NHANES (https://shap.readthedocs.io/en/latest/generated/shap.datasets.nhanesi.html)
- SUPPORT Study to Understand Prognoses Preferences Outcomes and Risks of Treatment (from DeepSurv paper, https://arxiv.org/abs/1606.00931)
- METABRIC The Molecular Taxonomy of Breast Cancer International Consortium (from DeepSurv paper, https://arxiv.org/abs/1606.00931)
- WHAS500 Worcester Heart Attack Study (https://scikit-survival.readthedocs.io/en/stable/api/datasets.html)
- FLCHAIN (https://scikit-survival.readthedocs.io/en/stable/api/datasets.html)
- SEER (from Kaggle, https://www.kaggle.com/code/jnegrini/breast-cancer-dataset)
Requirements
- Python 3.8 or later
- scikit-survival 0.17.2 or later
- pandas 1.4.3 or later
- numpy 1.22.4 or later
- shap 0.41 or later
- pyarrow 11.0 or later
Installation
Simply install via pip:
pip install survival-datasets
Examples
Import the datasets module from the package and load your dataset of choice:
from survdata import datasets
if __name__ == "__main__":
X, y = datasets.load_seer_dataset()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
survival-datasets-0.1.4.tar.gz
(263.1 kB
view hashes)
Built Distribution
Close
Hashes for survival_datasets-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a57e58e5ab2089ff556250475aa95f524165c04ff4b2a31eda9c6c57a95b63c9 |
|
MD5 | 47a6f1934b02f43a3256f2e3fd1537a2 |
|
BLAKE2b-256 | 3835e4c6bbe80526894e2eb0fc181ed573b3910900d67c19ff58105d91e21fc4 |