Our study aimed to explore the applicability of deep learning and machine learning techniques to distinguish MPE from BPE. We initially used a retrospective cohort with 726 PE patients to train and test the predictive performances of the driverless artificial intelligence (AI), and then stacked with a deep learning and five machine learning models, namely gradient boosting machine (GBM), extreme gradient boosting (XGBoost), extremely randomized trees (XRT), distributed random forest (DRF), and generalized linear models (GLM). Furthermore, a prospective cohort with 172 PE patients was applied to detect the external validity of the predictive models. The area under the curve (AUC) in the training, test and validation set were deep learning (0.995, 0.848, 0.917), GBM (0.981, 0.910, 0.951), XGBoost (0.933, 0.916, 0.935), XRT (0.927, 0.909, 0.963), DRF (0.906, 0.809, 0.969), and GLM (0.898, 0.866, 0.892), respectively. Although the Deep Learning model had the highest AUC in the training set (AUC = 0.995), GBM demonstrated stable and high predictive efficiency in three data sets. The final AI model by stacked ensemble yielded optimal diagnostic performance with AUC of 0.991, 0.912 and 0.953 in the training, test and validation sets, respectively. Using the driverless AI framework based on the routinely collected clinical data could significantly improve diagnostic performance in distinguishing MPE from BPE.