## 3 Results and Discussion
Figure 1: Tracking the progress of participants as they go through various stages (phases) of the ketogenic diet: (**a**) BMI during the phases (males and females together); (**b**) 3D plot of BMI during the phases, 1 (male)—top and 0 (female)—bottom. Following the steps of algorithm of Scheme 1 in the process of constructing the neural network for the prediction of obesity, data collection follows the first step; then, preprocessing, where the data are cleaned, normalized and descriptive statistics are presented; in the next step, the dataset is split into training and testing using the 'train_test_split()' function from the'sklearn_model_selection' module. The function takes several arguments, including the input features (\(\bar{\mathbf{x}}\)) and output variable (\(\bar{\mathbf{y}}\)), as well as the test size (in this case, 20% of the data is used for testing) and a random state value to ensure reproducibility. The purpose of converting the output variable to categorical labels is to prepare the data for use in a neural network that requires categorical labels as the output variable. The 'to_categorical()' function from the keras.utils.np_utils module is used to convert the output variables y_train and y_test into categorical labels. The model architecture is then chosen. A common architecture for obesity prediction is a feedforward neural network with multiple hidden layers. The model is then trained using the training set; during training, the weights and biases of the neural network are adjusted to minimize the error between the predicted outputs and the actual outputs. Figure 2: The histograms for each variable (age, sex (1—male, 0—female), BMI, MCHC (Mean Corpuscular Hemoglobin Concentration), cholesterol, glucose, platelets, leukocytes, ALT, triglycerides, TSH (thyroid stimulating hormone), magnesium, weight, output (1—have health problem, 0—normal weight and health)). The model summary is shown in Figure 4 with the architecture of the neural network created using Keras. The model is sequential, meaning that the layers of the network are stacked sequentially. Figure 5 presents the model in detail. The first layer is a fully connected layer with 16 neurons, which takes an input of 13 dimensions; the weights of this layer are initialized using a normal distribution. An L2 regularization with a value of 0.001 is added to the kernel to prevent overfitting. The activation function used in this layer is the rectified linear unit (ReLU). The second and third layers are dropout layers, which are added to prevent overfitting [39,40]. The dropout rate is set at 0.25. Dropout is used during the training phase; it involves randomly dropping units (neurons) with a specified probability (p) during each training iteration [41]. The fourth layer comprises eight neurons and is a fully connected layer. The fifth and final layer is also a fully connected layer with two neurons. The activation function used in this layer is softmax. The model is compiled using the RMSprop optimizer with a categorical cross-entropy loss function and accuracy as the evaluation metric. The learning rate for the optimizer is set at 0.001. Finally, the function returns the compiled model. The model summary is then printed using the summary() method, which provides a summary of the model architecture, including the number of parameters in each layer. \"Param #\" (short for parameter) represents the total number of trainable parameters in a neural network and includes all the weights and biases of the network. Each weight and bias contributes to the overall count of parameters. In the provided example, the total number of trainable parameters (Param #) is 378, which includes  
Figure 3: The heatmap for observed variables. the weights and biases of the network. The individual layers and their corresponding Param # values are shown in Figure 5.  
After training the neural network model [42; 43], the model is evaluated using the testing set. Various performance metrics such as accuracy, precision, recall, and F1-score are commonly used.