Atrial fibrillation (AF) is the most clinically diagnosed arrhythmia, as its prevalence increases with age, and its initial stage is paroxysmal atrial fibrillation (PAF). This pathology usually triggers hemodynamic disorders that can generate cerebrovascular accidents (CVA), causing morbidity and even death. The aim of this study is to predict the occurrence of PAF episodes in order to take precautions to prevent PAF episodes. The PhysioNet AFPDB prediction database was used to extract 77 heart rate variability (HRV) features using time domain, geometrical analysis, Poincar e plot, nonlinear analysis, detrended fluctuation analysis, autoregressive modeling, fast Fourier transform (FFT), Lomb-Scargle periodogram, wavelet packet transform (WPT) and bispectrum measurements. The number of features was reduced using the near-zero value, correlation, and recursive feature elimination (RFE) methods for time windows of 1, 2, 5, 10, and 30 min. Feature selection was performed using backwards selection, genetic algorithm, analysis of variance (ANOVA), and non-dominated sorting genetic algorithm (NSGA-III) methods, and then random forest, conditional random forest, k-nearest neighbor (KNN), and support vector machine (SVM) classification algorithms were applied and evaluated using 10-fold cross-validation. The proposed method achieved a precision of 93.24% with a 5-minute window and 89.21% with a 2-minute window, improving performance in predicting PAF when compared with similar studies in the literature.