som-shahlab / ehr_ml

Code for doing machine learning with various EHRs
MIT License
21 stars 3 forks source link

Streamline featurize and add a BaseModelOutput type class #10

Open jason-fries opened 3 years ago

jason-fries commented 3 years ago

ehr_ml.clmbr.featurize_patients should be refactored to improve the interface and enrich the outputs of the model akin to https://huggingface.co/transformers/main_classes/output.html#basemodeloutput

Simple pseudo-code

model = clmbr.from_pretrained(PATH_TO_CLMBR_MODEL)
train = dataloaders.Timelines(PATH_TO_EXTRACT, patient_cohort_dataframe) 
x_enc = model(train)