Type 2 diabetes mellitus (T2DM) is a chronic metabolic disorder characterized by elevated blood glucose levels. Despite the availability of pharmacological treatments, dietary plans, and exercise regimens, T2DM remains a significant global cause of mortality. Consequently, there is a growing interest in exploring lifestyle interventions, such as Intermittent Fasting (IF). This study aims to identify underlying patterns and principles for effectively improving T2DM risk parameters through IF. By analyzing data from multiple randomized clinical trials investigating various IF interventions in humans, a machine learning algorithm was employed to develop a personalized recommendation system. This system advises pre-diabetic and diabetic individuals on the most suitable IF interventions to improve T2DM risk parameters. With a success rate of 95%, this recommendation system offers highly tailored guidance, optimizing intermittent fasting's benefits for diverse population subgroups. The results of this study allow us to conclude that weight is the crucial feature for females, while age is the determining factor for males to reduce glucose levels in blood. By revealing patterns in diabetes risk parameters among individuals, this study not only provides practical guidance but also sheds light on the underlying mechanisms of T2DM, contributing to a deeper understanding of this complex metabolic disorder.