Machine Learning is used to analyze complex data in various fields of research. In this study, we applied an ensemble learning approach consisting of Random Forest Regression (RF), XGBoost Regression (XGB), Decision Tree Regression (DT) and Pearson correlation analysis as well as Shapley Additive Explanations (SHAP) to analyze the relationship between the HDI and Happiness indicators in Indonesia. Second, building a prediction model with an ensemble learning approach, namely stacking, which consists of several algorithms including RF, XGB, DT. The results of this study, one, based on the results of Pearson correlation analysis, Permutation Importance (PI), and SHAP, show that the happiness score of Indonesian people has a strong correlation with the Human Development Index variable. The Pearson correlation result shows a value of 0.88, which indicates a very strong positive relationship between HDI and happiness. In addition, the Permutation Importance and SHAP analysis also confirms that HDI is one of the most influential variables in predicting happiness scores in Indonesia. Second, the performance model for predicting happiness using stacking regressors with an R-Squared value of 97.68\%, MAE 0.002900, MSE 0.000021, and RMSE 0.004604.