Machine Learning for Personalized Medicine: Predicting Primary Myocardial Infarction from Electronic Health Records