ADS Capstone Chronicles Revised

27

Additionally, Table 4 displays the altering of certain nutritional component goals, based on the presence of a health condition. The final aspect of the patient-specific score imposed a BMI penalty. For every increment in Table 4 Nutritional Component Goals based on Condition

a patient’s BMI, the score is reduced by 0.025. As a result, the patient-specific score attempts to represent the suitability of a meal or individual food item based on individualized metrics. The higher the score, the more suitable that food is.

4.4.2 Test design The train-test split for both regression and classification models follows the standard 80/20 split. The target feature differs for the two modeling approaches. For regression modeling, the goal is to predict the continuous value of the patient score, which serves as the target feature. This approach provides a nuanced understanding of how well a food item aligns with a diabetic patient's dietary needs. For classification modeling, the focus is on enabling a more user-friendly deployment. A binary target feature, ‘Recommendation’, is created to classify foods as either recommended or not recommended. To define this binary feature, the median of the patient scores is calculated and used as the threshold for labeling items as recommended (above the median) or not recommended (below the median). 5 ResultsandFindings Results and evaluations have been separated accordingly based on modeling methods and the data being input to the models. The modeling process began with training each model using

default hyperparameters to establish baseline performance. After evaluating these initial results, the best-performing models from each category (regression and classification) were fine-tuned using grid search to optimize hyperparameters. The final model selections were based on the performance metrics achieved after hyperparameter tuning, ensuring the most accurate and reliable predictions. The final results reflect the performance of the optimized XGBoost Classifier model, which was chosen based on their evaluation metrics. 5.1 Evaluation of Results of Regression Models - Predicting Patient Score To evaluate the regression models trained on both menu food data and individual food data, two primary metrics were calculated: Mean Squared Error (MSE) and R-squared (R²). MSE provides insight into the models' ability to predict actual patient scores, with lower values indicating better performance. In contrast, R-squared measures how well the model captures the variability in the dataset. Positive R-squared values suggest that the model

229

Made with FlippingBook - Online Brochure Maker