Performance Analysis of Voting Regression-Based Ensemble Learning Methods for Food Demand Forecasting

ABSTRACT


Organization of the paper
The remaining sections of the paper are as follows: Section 2 addresses the literature survey, followed by Section 3 on research objectives, and Section 4 on methodology.The findings obtained, as well as the analysis and results, are discussed in section 5. section 6 ends with the conclusion.

LITERATURE REVIEW
This research intends to propose more precise food prediction.In this section, a few important studies on related methods are examined, along with each of their advantages and disadvantages.Proposed a novel approach for demand forecasting in a university refectory, using models for machine learning that consider the calendar effect and meal ingredients.Eighteen prediction models were developed, including Artificial Neural Networks, Gaussian Process Regression, Support Vector Regression, Regression Tree, and Ensemble Decision Tree models.The assessment metrics employed to evaluate the model performance include MSE and MAE.The Ensemble Decision tree-boosted model performed the best, with MSE, MAE, and R values of 0.51, 0.50, and 0.96, respectively.The study's contribution lies in its concentration on the meal ingredients and the diversity of models used.Additionally, prior research employing deep learning and machine learning has demonstrated encouraging outcomes.techniques for demand forecasting in the food industry [3][4].
To address the issue of uneven food production and increased food demand brought on by the world's expanding population.The project trains a learning model to forecast different food demand requirements, which can help suppliers detect food demand requirements at an early stage of production and prevent food wastage and financial losses.The model achieves an accuracy of 94.36% upon training a dataset of 4,56,548 rows and various features of different demand categories.By accurately forecasting food demand requirements, learning models have the potential to greatly enhance food demand forecasting and reduce food waste, benefiting both suppliers and the environment [2].
The study [1] focused on demand forecasting in the food industry, where precise forecasts are necessary due to the short shelf life of products.The study uses the Genpact Food Demand Forecasting dataset and compares the impact of various factors on demand.Seven regressors, including Random Forest, GBR, Light GBM, XG Boost, Cat Boost, LSTM, and Bi LSTM, are used for forecasting.The results indicate that deep learning models, particularly LSTM, perform better than other algorithms.The evaluation metrics used are RMSLE, RMSE, MAPE, and MAE, with values of 0.28, 18.83, 6.56%, and 14.18, respectively.The literature survey highlights the significance of ML and DL techniques in demand forecasting and the possibility of LSTM in improving accuracy.
Suggested [5][6] a model for food using machine learning to predict sales methods to achieve its first goal.The second goal involves comparing two datasets: one characterized by high correlation among its features and the other by low correlation.Multiple machine learning algorithms were employed in prediction in the second goal, to determine the top three algorithms that give the most accurate predictions.Conversely, when employing the second dataset, the best three algorithms are gradient boosting, random forest regressor, and decision tree.These conclusions are drawn from metrics such as RMSE and MSE.
The researcher [7] proposed an alternative method for predicting the stress intensity factor (SIF) of propagating fractures.They suggested using the gradient boosting regressor (GBR) as a substitute for the finite element technique (FEM) traditionally used for this purpose.According to the authors, the primary drawbacks of FEM-based SIF prediction include high calculation costs and significant time commitment.In their study, the authors trained the GBR using values of SIF derived via FEM, with 70% of the information utilized for training and 30% for validation.Throughout the validation procedure, the authors found a coefficient of correlation (Ρ) of 0.977 between the SIF values produced by FEM and those predicted by GBR.This high correlation shows a high degree of agreement between the two techniques.

RESEARCH OBJECTIVES
To propose predicting meal orders across diverse centres by employing the dataset, preprocessing, feature engineering, model selection, and ensemble techniques to optimize predictive performance.
To apply the implemented solution by partitioning the dataset for training and testing sets, then training individual models as well as the ensemble based on the practice data.Lastly, the testing information is forecasted to assess performance.
To test model functionality and ensemble on unknown data (testing set).Utilize measures to assess their performance, such as RMSE, R-squared, and MAE.This stage assists in determining how effectively the models generalize to new data.
To prove the efficiency of the suggested solution by analyzing the results obtained during testing.Comparing the performances of individual models with the ensemble model.If the ensemble model outperforms individual models, it demonstrates the efficiency of ensemble learning in this context.

METHODOLOGY
In this research, the forecasting method employed is machine learning, a technique designed to identify inherent data patterns through iterative learning.By continually applying new information to the patterns that were learned, machine learning permits the forecasting of upcoming patterns determined by these patterns.Although there are numerous methods within machine learning, this research specifically utilizes random forest regression and gradient-boosting regression [8].In this research, Figure 3, the evaluation is based on four algorithms for predictive modelling: Linear Regression, Random Forest Regressor, Gradient Boosting Regressor, and Decision Tree Regressor, assessing their performance based on R2-score, RMSE, and MAE.Notably, the Gradient Boosting Regressor and Random Forest Regressor exhibit the highest R2 scores of 83 and 73, respectively, indicating superior predictive capability.Leveraging ensemble techniques like voting regression, this research aims to merge the top-performing models to enhance predictive accuracy further.By merging the strengths of these algorithms, the research anticipates achieving excellent results, warranting further exploration and validation.

Dataset description
An American professional services company called Genpact provided the "Food Demand Forecasting" dataset for machine learning [1].The dataset consists of three separate datasheets: meal_info, which offers information about various meals; fulfilment_center, which includes details about each fulfilment centre; and food demand, which includes historical information on demand for all centres.Together, these three datasets total 4,56,548 and 15 features [1].

Dataset preprocessing
Data preprocessing assists in converting unprocessed data into a format that is usable.To change the original data into a usable form for this article, we employed exploratory data analysis, creating feature engineering and data cleaning approaches.
We use the correlation matrix to examine the correlations between the target variable; from Figure 4 'num_orders' and other properties within the collected dataset, we can identify which traits have substantial connections with the target variable and with each other by calculating the respective correlation coefficients of variables.
In essence, the correlation matrix here is an essential tool for understanding the complexities present within the collected dataset and for reaching well-informed conclusions during the modelling and data preprocessing stages.decisions and identifying issues.A scatter matrix is used to analyze the connections between many variables, which improves process comprehension, aids in decision-making, and helps identify issues.

Data cleaning and Feature engineering
The code begins by merging three datasets based on common columns.Unnecessary columns are dropped to streamline the dataset.Categorical variables are encoded for numerical processing.Feature engineering is conducted to create a new variable capturing the percentage difference between checkout and base prices.PCA is utilized in the feature space to decrease dimensionality.Two regression models, Gradient Boosting and Random Forest, are trained and evaluated.Finally, an ensemble model combining both regressors is constructed and assessed for predictive performance.Overall, the code encompasses data consolidation, preprocessing, feature engineering, model training, and ensemble modelling, aiming to predict the number of orders effectively.

Model Building 4.4.1. Random Forest Regression
The code begins by merging three datasets based on common columns.Unnecessary columns are dropped to streamline the dataset.Categorical variables are encoded for numerical processing.Feature engineering is conducted to create a new variable capturing the percentage difference between checkout and base prices.PCA is utilized in the feature space to decrease dimensionality.Two regression models, Gradient Boosting and Random Forest, are trained and evaluated.Finally, an ensemble model combining both regressors is constructed and assessed for predictive performance.Overall, the code encompasses data consolidation, preprocessing, feature engineering, model training, and ensemble modelling, aiming to predict the number of orders effectively.

Gradient Boosting Regression
Gradient Boosting Regression (GBR) is an effective algorithm for ensemble machine learning that has gained significant popularity for its effectiveness in tackling regression predictive modelling tasks.GBR iteratively improves based on the forecasts produced by the previous models.This iterative process focuses on minimizing the residual errors between the values that were predicted and those of actual values.Gradient Boosting regression played a central role in this project, contributing to accurate prediction of food demand based on various features, and it is compared with other models to assess its effectiveness [9].

Voting Regression
In a voting ensemble Figure 6, we utilize multiple approaches instead of relying solely on one model.This methodology significantly improves system efficiency for issues involving both regression and classification.For regression tasks, we aggregate the estimations from each model by averaging them to derive a final estimate; these ensembles are called voting regressors (VRs) [10].(1) Figure 6.Voting regressor ensemble of gradient boosting and random forest

Performance prediction measures
In discussing regression accuracy, it is often noted that several metrics play key roles: Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and R2-Score.MAE, for instance, is seen as reflecting the magnitude, essentially showing how far off the predictions are on average.MAE, on the other hand, provides information on the average relative error and provides a sense of accuracy in comparison to the actual numbers.Since RMSE is the square root of the average squared error, it can be directly compared to the units of the predicted variable, making it a popular choice when it comes to error magnitude.In contrast, the R2-Score quantifies the proportion of the variation in the dependent variable that can be predicted from the independent variables.When combined, these metrics provide an in-depth understanding of the effectiveness of the regression model [11][12].

RESULTS AND DISCUSSION
This research compares the performance of the Random Forest Regressor and Gradient Boosting Regressor in predicting food demand, with both models achieving high accuracy.The Gradient Boosting Regressor has a lower average prediction error than the Random Forest Regressor.An ensemble model combining both models using voting regression achieves an R2-score of 0.99, RMSE of 0.01, and MAE of 0.00, indicating high prediction accuracy.The improvement in food demand forecasting can contribute to more efficient and sustainable food supply chains, ultimately benefiting both businesses and the environment.The results demonstrate the potential of machine learning techniques in addressing the critical issue of inaccurate demand forecasting in the food sector.

Random Forest Regression
The RMSE value of 0.010 means an average prediction error of approximately 0.01 units.The R2 value of 0.99 indicates the Random Forest model can explain approximately 99% of the variance in actual grocery sales.The MAE value of 0.004 represents the mean absolute difference between the actual and expected food sales values.

Gradient Boosting Regression:
In Figure 7, the RMSE value of the test is 0.002, indicating a lower average prediction error compared to Random Forest Regression.The R2 value of 0.99 suggests that approximately 99% of the variance in actual grocery sales can be explained by the Gradient Boosting Regression model.The MAE value of 0.001 represents a lower average absolute deviation comparing the expected and actual food sales values.

CONCLUSION
In this research, we applied Voting Regression to predict food demand, combining Random Forest Regressor and Gradient Boosting Regressor.The results suggested that the ensemble model outperformed the distinct models, with RMSE, R2 score, and Mean Average Error (MAE) attaining 0.01, 0.99, and 0.00, respectively.These findings suggest that using Voting Regression to predict food demand can result in reliable and accurate forecasts; in conclusion, Machine Learning Algorithms have been shown to be effective in predicting food demand, and ensemble techniques like Voting Regression present a valuable approach to enhancing prediction accuracy.Future studies can focus on applying these techniques to different contexts and exploring the application of other ensemble methods to further improve prediction accuracy.

Figure 1 .Figure 1
Figure 1.Steps involved Figure1Shows that steps to involved to build the machine learning model for the proposed problem.Figure2shows from the first steps to feed the input data, and cleaning the noisy in data preprocessing techniques , applying different machine models to identify the best model among them.

Figure 3 .
Figure 3. Comparing results of different algorithms

Figure 4 .
Figure 4. Heat map for the given dataset Figure 5 shows the scatter matrix employed to analyze how several variables are related to one another.It results in a deeper comprehension of the processes and can be beneficial in making informed

Figure 7 .
Figure 7.Comparison with the previous studies