Machine learning methods can assess contractility of donor hearts maintained via ex vivo perfusion to predict posttransplant cardiac function.