## 3 Materials and Methods
### Proposed Methodology  
The process employed a 10-fold cross-validation that served as the outer most loop in training the model. The whole dataset was split into 10 sets. For every set, recursive feature elimination was performed on the training set, to extract the optimal set of features. Recursive feature elimination involves the repeated construction of a model, selecting and discarding the worst performing features and then reiterating the whole process with the remaining features. This process was exercised until th all features in the dataset were exhausted. Base models are trained using the final selected features of a training dataset. This generates a feature selection mask that is further applied to the test set. The refined test set was fitted on the model. Figure 2 depicts the methodology of the proposed scheme for efficient QOL prediction. The whole process was repeated for all 10 folds for the seven base models. The performance of the models was evaluated using Pearson Correlation coefficient (_r_), Coefficient (_R_), root mean squared error (RMSE) and accuracy parameters. The four topmost base models were selected, on the basis of RMSE, and further utilized for stacking generalization.  
The stacked generalization framework incorporates two kinds of models: (i) Tier 1 models (seven base models) and (ii) a Tier 2 model, i.e., one meta-model. The top four base models were selected based on their RMSE value. The stacked generalization exploited the Tier 2 approach to train from the outcomes of the Tier 1 approaches, i.e., the top base classifiers were combined by a meta-level (Tier 2) classifier to predict the correct class based on the predictions of the top base level (Tier 1) classifiers. Usually, the framework of stacked generalization achieves more accurate predictions than the best Tier 1 model.  
The technique generated the proposed model in two phases:  
Phase 1--Seven different models were trained for life satisfaction score prediction. (Tier 1 models)  
Phase 2--The top four models (based on RMSE) were combined in a group of three, making four different combinations to further improve the performance of the prediction model (Tier 2 model).  
The final output was selected using the stacking technique [26].  
The flow of the proposed methodology is presented in Figure 3. The figure depicts the schematic diagram of the final combination of all top four ensemble models. In this work, a combination of three machine-learning models was used to develop an ensemble machine-learning approach for determining the life satisfaction score of a country. Each top base learner was trained using 10-fold cross-validation, wherein the training set was split into 10 folds. A base model was fitted on the 9 parts and predictions were made on the 10 th part. This process was repeated 10 times for each fold of training data. The base model was then fitted on the overall training dataset to calculate its performance on the test set. The previously mentioned steps were applied to all the base learners. At this time, the output labels (predicted) (i.e., the predictions from the training set) of the first-level classifiers were used as new features for the second level learner, and the original labels were utilized as labels inside the new dataset. The second level model was used to make predictions on the test set. As the data traveled through the three models, the models trained the data to offer reliable and precise outcomes. The best ensemble model was based on RMSE contributes to the final prediction.  
Figure 3: Workflow of the proposed scheme.