One of the complex challenges in ventilated cavitating flow studies is analyzing hysteresis behavior and the formation air entrainment coefficient (Cqf) under different conditions. This study explores the formation and collapse processes of the supercavity using experimental observations, numerical simulations, and machine learning (ML) models to reveal the hysteresis behavior of air entrainment at different flow conditions. Initially, the research focused on studying air entrainment hysteresis for a disk-shaped cavitator under different Froude numbers (Fr) through experimental and numerical methods. The study identified two key air entrainment coefficients in the hysteresis curves, which are important for gas generator design. In the ML section, hyperparameter optimization for the random forest (RF) model is performed using genetic algorithm (GA) and particle swarm optimization (PSO). The results demonstrate that the GA-RF model is more accurate than the PSO-RF model in predicting experimental data. The GA-RF findings show that, for a fixed cavitator diameter, Cqf increases with Fr, reaching a maximum value (MaxCqf) before decreasing as Fr continues to rise. Additionally, with an increase in the cavitator diameter, MaxCqf increases and Fr belonging to this ventilation coefficient (FrMaxCqf) decreases.