Cyber-Physical Systems (CPS) embed computation and communication capability into its core to regulate physical processes and seamlessly mediate between the cyber and the physical world for various control and monitoring tasks. Health CPS, a variant of CPS in the healthcare sector, acts as a health monitoring system to dynamically capture, process, and analyze health sensor data through integrated internet of things (IoT)-enabled cyber-physical processes. These systems can suitably support patients suffering from non-communicable diseases (NCDs) or who are at risk of suffering from those. Identifying the risk of NCDs, such as heart disease and diabetes, requires artificial intelligence (AI) techniques into the core of health CPS. Recently, there has been growing interest to incorporate machine learning into CPS, which can facilitate the disease classification, detection, monitoring, and prediction of several NCDs. However, there is a shortage of visible work that focus on early-stage risk prediction of these diseases. In this work, we propose a novel machine learning based health CPS framework that addresses the challenge of effectively processing the wearable IoT sensor data for early risk prediction of diabetes as an example of NCDs. In the experiment, a verified diabetic dataset has been used for training, while the testing has been performed on an artificially generated data collection from sensors. The experiment with several machine learning algorithms shows the effectiveness of the proposed approach in achieving the maximum precision from the Random Tree algorithm, which requires a minimum time of 0.01s to construct a model and obtains 94% accuracy to predict the probability of diabetes at an early point.