## 2 Materials and Methods
### Classification Well-Being Model  
The Well-Being Model (WBM) employs 11 input features encompassing various health and wellness metrics. The output is categorized into ten distinct classes, corresponding to _WBI_ values ranging from 1 to 10. To facilitate this classification, the LbfgsMaximumEntropy algorithm, a form of multiclass logistic regression, was utilized for training. The LbfgsMaximumEntropy method optimizes the observed data, taking necessary measures to label diverse datasets. LbfgsMaximumEntropy is integrated into MLNET using the C# programming language. The process begins with data collection, where the features are average heart rate, minimum and maximum heart rates, daily step count, distance traveled, calories expended, sleep duration (including deep and shallow sleep), and stress level, as depicted in Figure 3.  
The core of the modeling process is the model training phase. In this stage, an appropriate classification algorithm is selected based on the data characteristics and classification objectives. MLNET provides a range of algorithms, including logistic regression, decision  
Figure 3: Features contributing to the WBI. Figure 2: Distribution of entries by WBI. trees, and neural networks. Once the algorithm is defined, the dataset is divided into training and testing subsets using an 80/20 split. This separation enables model evaluation and ensures generalizability to unseen data using the C# code shown in Figure 4.  
A data processing pipeline is established to streamline the workflow from data input to model training. This pipeline includes feature concatenation, transformations, and the specification of the chosen classification model. After constructing the pipeline, the model is trained using the training dataset, allowing it to learn from the provided features and their corresponding classifications of well-being. The C# code used is depicted in Figure 5.  
Following training, model evaluation occurs, where the model's performance is assessed against the test dataset. Various metrics, such as macro accuracy, micro accuracy, and log loss are employed to evaluate the model's classification capabilities using the C# code from Figure 6.  
Each of these metrics provides insight into the model's predictive capabilities in handling class imbalances:  
* Macro accuracy is the average accuracy across all classes, treating each class equally regardless of size, using Equation (7) [61]: \[MacroAccuracy=\frac{1}{N}\sum_{i=1}^{N}\frac{TP_{i}}{TP_{i}+FP_{i}+FN_{i}}\] (7) where \[MacroAccuracy\] is the macro accuracy; \[N\] is the total number of classes; \[TP_{i}\] is the true positives for class Figure 3:0; Figure 3:1 is the false positives for class Figure 3:2; Figure 3:3 is the false negatives for class Figure 3:4. * Micro accuracy combines the contributions of all classes to calculate overall accuracy, making it particularly relevant in situations with class imbalance. It calculates  
Figure 3:5 C# code for data splitting into training and testing sets in WMB. Figure 3:6 C# code for data processing pipeline with feature concatenation and multiclass classification trainer in ML_NET. Figure 3:7 C# code for evaluation metrics for multiclass classification model in ML_NET. the total true positives, false negatives, and false positives across all classes, using Equation (8) [61]:  
Figure 3:8  
where  
_MicroAccuracy_ is micro accuracy. * Log loss, also known as logistic loss or cross-entropy loss, measures the effectiveness of a classification model that outputs a probability value between 0 and 1. It quantifies, using Equation (9), the difference between the predicted probabilities and the actual class labels [61]: Figure 3:9 (9) where  
_LogLoss_ is the logistic loss;  
\(N\) is the total number of classes;  
\(I\) is the total number of instances;  
\(y_{ij}\) is a binary indicator (0 or 1) of whether the class label is the correct classification, for instance, \(i\);  
\(p_{ij}\) is the predicted probability that instance \(i\) belongs to class \(j\).