Machine learning combined with consensus clustering analysis revealed a greater prevalence of periodontitis among patients with diabetes mellitus in Cluster B. This cluster was characterized by a smoking habit, a lower education level, a higher income-to-poverty ratio, and higher levels of albumin (ALB g/L) and alanine aminotransferase (ALT U/L). Here, GPT is linked to diabetes mellitus.