Аңдатпа
A BSTRACT Objective: The objective of this study was to compare the performance of logistic regression and random forest models for diabetes prediction using the University of California, Irvine (UCI) Centers for Disease Control and Prevention (CDC) diabetes health indicators dataset. Materials and Methods: A secondary analysis was conducted using the binary version of the CDC diabetes health indicators dataset obtained from the UCI machine learning repository. The dependent variable was diabetes status (diabetes_binary), coded as 0 for no diabetes and 1 for diabetes. Predictor variables included health-related and lifestyle-related indicators such as high blood pressure, high cholesterol, cholesterol check status, body mass index, smoking, stroke history, heart disease or heart attack, physical activity, fruit and vegetable consumption, and heavy alcohol consumption. The dataset was divided into training (80%) and testing (20%) subsets using a stratified split. Logistic regression and random forest were trained in Python. Model performance was evaluated using accuracy, precision, recall, F1-score, confusion matrices, and the area under the receiver operating characteristic curve (AUC). Results: Logistic regression achieved an accuracy of 0.746, precision of 0.737, recall of 0.764, F1-score of 0.750, and AUC of 0.823. Random forest achieved an accuracy of 0.736, precision of 0.720, recall of 0.772, F1-score of 0.740, and AUC of 0.812. Logistic regression showed better overall performance in terms of accuracy, precision, F1-score, and AUC, whereas random forest demonstrated slightly higher recall. Conclusion: Both machine learning models demonstrated satisfactory performance for diabetes prediction. Logistic regression showed the most balanced overall performance and may be more suitable for this dataset, particularly when interpretability is important. These findings support the use of machine learning methods for diabetes risk assessment in public health research.