An algorithm that predicts death