In spite of the popularity of random forests (RF) as an efficient machine learning algorithm, methods for constructing the potential association for between patent foramen ovale (PFO) and cryptogenic stroke (CS) using this technique are still barely. For the vital regional study areas (atrial septum), RF was used to predict CS in patients with PFO using partial clinical data of patients and remotely sensed imaging examination data obtained from Tee imaging. We validated our method on a dataset of 151 consecutive patients with detected PFO at a large grade A hospital in China from November 2018 to December 2020, we obtained an area under the relative operating characteristic curve of 0.816, with 65% specificity at 73% sensitivity. The RF models accurately represented the relationship between the CS and remotely sensed predictor variables. Therein, maximum mobility, large right-to-left shunt during Valsalva maneuver, size of PFO in diastole and systole, and diastolic length of the tunnel present higher predictive value in CS. Our findings suggest that multi-Doppler sensor data by transesophageal echocardiography (TEE)-detected morphologic and functional characteristics of PFO may play important roles in the occurrence of CS. These results indicate that the established random forest model has the potential to predict CS in patients with PFO and great promise for application to clinical practice.