A large study applies advanced machine learning to identify shared risk factors and predictors of disease onset in patients with epilepsy and depression.