Machine learning#
Prediction models for patient outcomes, from linear and gradient boosting models to recurrent and transformer networks for time series. Models are trained, calibrated and evaluated on patient-level splits of static and longitudinal data.
Tasks and splits#
Training and prediction#
Fit a model that predicts the targets of a task from variables and obs columns. |
|
Predict the targets of every observation with a fitted model. |
|
A model fitted by |
Deep learning models#
These models need the ml extra, pip install 'ehrapy[ml]'.
Multilayer perceptron on the summaries of longitudinal variables and the static covariates. |
|
Gated recurrent unit network on the time series of the variables, whether they were observed and the time since their last observation. |
|
Long short-term memory network on the time series of the variables, whether they were observed and the time since their last observation. |
|
GRU-D [CPC+18], a gated recurrent unit network whose inputs decay towards the mean and whose hidden state decays with the time since the last observation. |
|
Temporal convolutional network [BKK18] of causal convolutions on the time series of the variables, whether they were observed and the time since their last observation. |
|
Transformer encoder [VSP+17] over timepoints, pooled with attention that is stored by |
|
RETAIN [CBS+16], which weighs timepoints with attention that is stored by |
|
A network whose embedding, together with the static covariates, feeds a linear output layer. |
|
How deep learning models are trained. |
Evaluation#
Evaluate predictions with bootstrap confidence intervals, overall or per subgroup. |
Calibration and uncertainty#
Calibrate the predicted probabilities of a fitted model on held-out observations. |
|
Add split conformal prediction sets for classification and intervals for regression to a fitted model. |
Interpretation#
Compute how much the predictions of a fitted model rely on every variable. |