Algorithm matches human cardiologists in detecting heart attacks