To increase healthcare quality, early illness prediction helps patients prevent potentially life-threatening health issues before it is too late. Artificial intelligence is a rapidly evolving area, and its applications to diabetes, a worldwide epidemic, have the potential to revolutionize the way diabetes is diagnosed and managed. A total of six supervised machine learning algorithms based on patient data were used and compared to predict the diagnosis of diabetes mellitus. For experiments, the Pima Indians Diabetes Database was used, and their missing values were carefully handled by different techniques. For random train-test splits, the Random Forest classification algorithm achieved an accuracy rate of 92 percent. This model outperforms other state-of-the-art approaches due to the application of a combination of techniques for dealing with missing values (the mixture of imputing missing values techniques) that is proposed. With this approach, the models of this manuscript achieved better accuracy than prior work done with the Pima diabetes data.