This paper presents a novel model for arrhythmia detection based on a cascading technique that utilizes a combination of the One-Sided Selection (OSS) method, Support Vector Machine (SVM), and K-Nearest Neighbor (KNN) algorithms, this model denoted by (OWSK) model to classify four types of electrocardiogram (ECG) heartbeats following inter-patient scheme. The OWSK model consists of three stages. The first stage involves resampling using the One-Sided Selection (OSS) method to solve the imbalance problem and reduce data by removing noisy, borderline, and redundant samples. The second stage involves using Wavelet Transformation (WT) and Power Spectral Density (PSD) to extract the most relevant frequency domain features. The third stage involves a cascading process by constructing the classifier from SVM trained on the whole dataset to classify normal and abnormal beats. Then, KNN (K-Nearest Neighbors) is trained on only the three irregular minority classes to classify the three types of arrhythmias for the detection of ventricular ectopic beats, supraventricular ectopic beats, and fusion beats (V, S, and F). The performance of the proposed model is evaluated in terms of different metrics, including accuracy, recall, precision, and F1 score. The results show the superiority of the proposed model in medical diagnosis compared to the latest works, where it achieves 90%, 90%, 93%, and 91% for accuracy, recall, precision, and F1 score under the inter-patient paradigm and 98%, 98%, 98%, and 98% under the intra-patient paradigm.