Summary Machine learning (ML) has become a robust method for modeling field operations based on measurements. For example, wellbore cleanout is a critical operation that needs to be optimized to enhance the removal of solids to reduce problems associated with poor hole cleaning. However, as wellbore geometry becomes more complicated, predicting the cleaning performance of fluids becomes more challenging. As a result, optimization is often difficult. Therefore, this research focuses on developing a data-driven model for predicting hole cleaning in deviated wells to optimize drilling performance. More than 500 flow loop measurements from eight studies are used to formulate a suitable ML model to forecast hole cleanout in directional wells. Measurements were obtained from hole-cleaning experiments that were conducted using different loop configurations. Experiments ranged in test-section length from 22 to 100 ft, in hole diameter from 4 to 8 in., and in pipe diameter from 2 to 4.5 in. The experiments provided measured equilibrium bed height at a specific flow rate for various fluids, including water-based and synthetic-based fluids and fluids containing fibers. Several relevant test parameters, including fluid and cutting properties, well inclination, and drillstring rotation speed (drillpipe rev/min), were also considered in the analysis. The collected data have been analyzed using the Cross-Industry Standard Process for Data Mining. This paper is unique because it systematically evaluates various ML models for their ability to describe hole cleanout processes. Six different ML techniques: boosted decision tree (BDT), random forest (RF), linear regression, multivariate adaptive regression spline (MARS), neural networks, and support vector machine (SVM) have been evaluated to select the most appropriate method for predicting bed thickness in a wellbore. Also, we compared the predictions of the selected ML method with those of a mechanistic model for cases without drillstring rotation. Finally, using the ML model, a parametric study has been conducted to examine the impact of various parameters on the cleanout performance of selected fluids. The results show the relative influence of different variables on the prediction of cuttings bed. Accordingly, flow rate, drillpipe rev/min, and fluid behavior index have a strong impact on dimensionless bed thickness, while other parameters such as fluid consistency index, solids density and diameter, fiber concentration, and well inclination angle have a moderate effect. The BDT algorithm has provided the most accurate prediction with an R2 of 92%, a root-mean-square error (RMSE) of 0.06, and a mean absolute error (MAE) of roughly 0.05. A comparison between a mechanistic model and the selected ML technique shows that the ML model provided better predictions.