Code Blue events, which include cardiac or respiratory arrest, can be difficult to anticipate, researchers said.
Doctors use a scorecard, known as the Modified Early Warning Score, to estimate the severity of a patient's status by looking at vital signs like heart rate, blood pressure and temperature.
Sriram Somanchi of Carnegie Mellon University in Pittsburgh, Pennsylvania, and his colleagues wanted to see if a computer could predict when these emergencies were imminent.
The researchers trained a machine-learning algorithm on data from 133,000 patients who visited the NorthShore University HealthSystem, a partnership of four Chicago hospitals, between 2006 and 2011, 'New Scientist' reported.
Also Read
It guessed correctly about two-thirds of the time, while a scorecard flagged just 30 per cent of events.
The algorithm still needs work - it reports a false positive 20 per cent of the time, said Somanchi.
To improve its performance, his team is planning to train the system with data from other hospitals.