For efficient interventions, we would like to know the causal effect of the intervention on a given individual: the individual treatment effect. Given the proper set of covariates, such quantity can be computed with machine-learning models: contrasting the predicted outcome for the individual with and without the treatment. I will analyse in detail how to best compute such quantities: what choice of covariates to minimize the variance, how to empirically select the best machine-learning model, and how a good choice of population-level summaries of treatment effect is least sensitive to heterogeneity.