We employed machine learning (ML) approaches to evaluate 2,199 clinical features and disease phenotypes available in the UK Biobank as predictors for Atrial Fibrillation (AF) risk. After quality control, 99 features were selected for analysis in 21,279 prospective AF cases and equal number of controls. Different ML methods were employed, including LightGBM, XGBoost, Random Forest (RF), Deep Neural Network (DNN),) and Logistic Regression with L1 penalty (LR). In order to eliminate the black box character of the tree-based ML models, we employed Shapley-values (SHAP), which are used to estimate the contribution of each feature to AF prediction. The area-under-the-roc-curve (AUROC) values and the 95% confidence intervals (CI) per model were: 0.729 (0.719, 0.738) for LightGBM, 0.728 (0.718, 0.737) for XGBoost, 0.716 (0.706,0.725) for DNN, 0.715 (0.706, 0.725) for RF and 0.622 (0.612, 0.633) for LR. Considering the running time, memory and stability of each algorithm, LightGBM was the best performing among those examined. DeLongs test showed that there is statistically significant difference in the AUROCs between penalised LR and the other ML models. Among the top important features identified for LightGBM, using SHAP analysis, are the genetic risk score (GRS) of AF and age at recruitment. As expected, the AF GRS had a positive impact on the model output, i.e. a higher AF GRS increased AF risk. Similarly, age at recruitment also had a positive impact increasing AF risk. Secondary analysis was performed for the individuals who developed ischemic stroke after AF diagnosis, employing 129 features in 3,150 prospective cases of people who developed ischemic stroke after AF, and equal number of controls in UK Biobank. The AUC values and the 95% CI per model were: 0.631 (0.604, 0.657) for XGBoost, 0.620 (0.593, 0.647) for LightGBM, 0.599 (0.573, 0.625) for RF, 0.599 (0.572, 0.624) for SVM, 0.589 (0.562, 0.615) for DNN and 0.563 (0.536, 0.591) for penalised LR. DeLongs test showed that there is no evidence for significant difference in the AUROCs between XGBoost and all other examined ML models but the penalised LR model (pvalue=2.00 E-02). Using SHAP analysis for XGBoost, among the top important features are age at recruitment and glycated haemoglobin. DeLongs test showed that there is evidence for statistically significant difference between XGBoost and the current clinical tool for ischemic stroke prediction in AF patients, CHA2DS2-VASc (pvalue=2.20E-06), which has AUROC and 95% CI of 0.611 (0.585, 0.638).