Résumé : Background: Machine learning and deep learning techniques are now used extensively for atrial fibrillation (AF) screening, but their use for AF crisis forecasting has yet to be assessed in a clinical context. Aims: To assess the value of two machine learning algorithms for the short-term prediction of paroxysmal AF episodes. Methods: We conducted a retrospective study from an outpatient clinic. We developed a deep neural network model that was trained for a supervised binary classification, differentiating between RR interval variations that precede AF onset and RR interval variations far from any AF. We also developed a random forest model to obtain forecast results using heart rate variability variables, with and without premature atrial complexes. Results: In total, 10,484 Holter electrocardiogram recordings were screened, and 250 analysable AF onsets were labelled. The deep neural network model was able to distinguish if a given RR interval window would lead to AF onset in the next 30 beats with a sensitivity of 80.1% (95% confidence interval 78.7–81.6) at the price of a low specificity of 52.8% (95% confidence interval 51.0–54.6). The random forest model indicated that the main factor that precedes the start of a paroxysmal AF episode is autonomic nervous system activity, and that premature complexes add limited additional information. In addition, the onset of AF episodes is preceded by cyclical fluctuations in the low frequency/high frequency ratio of heart rate variability. Each peak is itself followed by an increase in atrial extrasystoles. Conclusions: The use of two machine learning algorithms for the short-term prediction of AF episodes allowed us to confirm that the main cause of AF crises lies in an imbalance in the autonomic nervous system, and not premature atrial contractions, which are, however, required as a final firing trigger.