Abstract The problem of combating cardiovascular diseases is becoming increasingly important due to the high level of disability and mortality from heart disease. In this paper, a study of methods for predicting heart disease using electrocardiography and machine learning algorithms was conducted. In total, during the study, 75 000 numerical experiments with various machine learning algorithms and their parameters were conducted. Based on the comparative analysis, the models and methods of machine learning were selected that gave the best results. The following methods were applied: logistic regression, k-nearest neighbors algorithm, decision tree, support-vector machine, Bayesian classifier, random forest, and deep neural networks. The selected models were generalized to identify their parameters and effective application.