DESIGN AND IMPLEMENTATION OF A FOOD DEMAND PREDICTION SYSTEM USING XGBOOST ALGORITHM
Abstract
The lack of accurate demand forecasting systems leads to food waste and meal shortage in the cafeterias. The cafeteria management relies on a guesswork system and estimation planning and is very unreliable to anticipate change in student demand caused by academic calendar events, weather conditions, and day of week and other variables. Encouraging the use of machine learning in structured tabular data to detect and learn demand patterns could improve food service planning and reduce waste. In this study, the XGBoost algorithm was used to predict daily food consumption quantities for the University cafeteria which the staff can then plan quantity to be prepared around that value. The model was trained on a dataset of more than 5,800+ records spanning multiple academic semesters, making use of seventeen variables that influence demand including meal time slot, day of week, semester, examination period, resumption week, weather condition, and event type. The dataset was passed through a full preprocessing pipeline, and the model was deployed as a fully operational multi-page web application named FoodCast AI, built using the Streamlit framework in Python. Performance was evaluated using standard regression metrics including Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and the Coefficient of Determination (R²). The model achieved strong performance across evaluation metrics, with a Training R² of 99.1%, a Training RMSE of 132.70, and a Training MAE of 98.79. Real-world evaluation conducted through validated meal service predictions produced an R² of 79.5%, an RMSE of 686.84, and an MAE of 515.62 portions, classifying the system as Good under the performance framework. These results indicate that XGBoost algorithm captures the demand patterns driven by the University academic cycle, including the weekly Sabbath attendance surge, examination period decline, and SIWES departure effects.
Full-Text Access Notice
In accordance with the NERD Policy on promoting peer-reviewed publication, public access to the full text of a project, thesis or dissertation is restricted for three years, allowing the author and supervisors sufficient time to pursue peer-reviewed publication.
During this period, researchers with legitimate academic or research purposes may request authorisation directly from the author to enable NERD to release the indexed full texts of the work using the form below.