Views
No views yet
1git clone https://huggingface.co/ai-lab/Can-SAVE
2cd CanSave
3pip install -r requirements.txt1pandas==1.5.3
2numpy==1.23.2
3lifelines==0.27.4
4scikit-learn==1.1.3
5scipy==1.10.0
6PyYAML==6.0
7openpyxl==3.0.101Can-SAVE/
2├── EHR/
3│ └── id_26.csv
4├── survival_models/
5│ ├── kaplan_meier_both.pkl
6│ ├── kaplan_meier_males.pkl
7│ ├── kaplan_meier_females.pkl
8│ └── aft.pkl
9├── CanSave.py
10├── Example_How_To_Train_Survival_Models.py
11├── KaplanMeierEstimator.py
12├── CONFIG_CanSave.yaml
13├── icd10_groups.xlsx
14├── requirements.txt
15├── LICENSE
16└── README.md$ python Example_How_To_Train_Survival_Models.py$ python CanSave.py1# required libraries
2import numpy as np
3import pandas as pd
4
5from CanSave import CanSave
6
7# entry point
8if __name__ == '__main__':
9 # Make new object for feature engineering
10 config_path = './CONFIG_CanSave.yaml'
11 cs = CanSave(CONFIG_PATH=config_path)
12 print(help(cs))
13
14 # Load the patient's EHR
15 path_ehr = './EHR/id_26.csv'
16 ehr = pd.read_csv(path_ehr, sep=';').set_index('patient_id')
17 sex = ehr['sex'].iloc[0]
18 birth_date = ehr['birth_date'].iloc[0]
19
20 # Make feature engineering for the risk prediction
21 features = cs.feature_engineering(
22 sex = sex, # sex of the patient
23 birth_date = birth_date, # birth date of the patient
24 ehr = ehr, # Electronic Health Records of the patient
25 date_pred = '2022-01-01', # date of the risk estimation
26 deep_weeks = 108 # deep of the EHR's history (in weeks)
27 )
281@misc{philonenko2025,
2 title={Can-SAVE: Deploying Low-Cost and Population-Scale Cancer
3 Screening via Survival Analysis Variables and EHR},
4 author={Petr Philonenko and Vladimir Kokh and Pavel Blinov},
5 year={2025},
6 eprint={2309.15039},
7 archivePrefix={arXiv},
8 primaryClass={cs.LG},
9 url={https://arxiv.org/abs/2309.15039},
10}