 This paper proposes a novel method for early detection and classification of arrhythmias from electrocardiograms, ECGs. It combines a recently developed metaheuristic optimization algorithm with existing machine learning algorithms, such as support vector machines, SVMs, k-nearest neighbors, KNNs, gradient boosting decision trees, GBDTs, and random forests, RFs. The optimization algorithm was used to tune the hyperparameters of these algorithms, resulting in higher accuracy than other approaches. The proposed method was evaluated on three publicly available datasets, achieving an overall accuracy of 99.92%. This demonstrates the effectiveness of the proposed approach in detecting and classifying arrhythmias from ECGs. This article was authored by Mahmoud Hassaballah, Yasser M. Waysery, Ibrahim E. Ibrahim and others. We are article.tv, links in the description below.