Allowing machines to learn risk factors in a huge number of patients makes for better predictions of heart attacks, according to a new study.

The artificial intelligence “black-box” algorithm employed by doctors and data experts at the University of Nottingham was better at predicting heart attacks than the typical methodology established by the American College of Cardiology, they report in PLOS One.

“Machine-learning significantly improves accuracy of cardiovascular risk prediction, increasing the number of patients identified who could benefit from preventive treatment, while avoiding unnecessary treatment of others,” they write.

The scientists took a group of 383,592 patients from the United Kingdom’s Clinical Practice Research Datalink. A wide variety of risk factors and health outcomes were tracked from January 2005 to January 2015.

A random 75 percent of the sample (295,267) went into the “training” of the AI. The other 25 percent (82,989 patients) were used to test the accuracy of the machine-produced algorithms.

The traditional cardiology prediction model from the ACA includes factors like age, total cholesterol, HDL cholesterol, smoking, blood pressure, and diabetes.

But the four machine algorithms turned up a wider array of factors in their models, including: COPD, severe mental illness, prescription of oral corticosteroids, triglyceride levels, atrial fibrillations, chronic kidney disease, and rheumatoid arthritis.

There were 24,970 cardiovascular events in the test group. The neural networks algorithm established by the AI (the best of the four models) was 3.6 percent more accurate than the current established model, the Nottingham researchers report. Most importantly, it corrected predicted an additional 355 more patients who developed cardiovascular disease that were not identified by the ACA guidelines.

But the limitations on “black-box” machine learning are important to note, they add. The machine develops its own tools and techniques of prediction, which can only be partially understood and mapped by the human operators, they explain.

“It is acknowledged that the ‘black-box’ nature of machine-learning algorithms, in particular neural networks, can be difficult to interpret,” they write. “This refers to the inherent complexity in how the risk factor variables are interacting and their independent effects on the outcome.”

Machine learning has been looked to as a method to encompass a complex variety of risk factors in diseases that are still unpredictable. Last month a team proposed an Alzheimer’s prediction model in PLOS Medicine.