 This study investigated the impact of various factors on residential building energy consumption following the COVID-19 pandemic. It used a PSO-optimized random forest classification algorithm to identify the most important factors contributing to residential heating energy consumption. A self-organizing map was employed for feature dimensionality reduction, and an ensemble classification model based on the stacking method was trained on the reduced data. The results showed that the stacking model outperformed the other models with an accuracy of 95.4%. Additionally, a causal inference method was introduced to explore and analyze the factors influencing energy consumption. This revealed a clear causal relationship between water pipe temperature changes, air temperature, and building energy consumption, which compensates for the neglect of temperature in the SHAP analysis. These findings can help residential building owners slash managers make more informed decisions around the selection of efficient heating management systems to save on energy bills. This article was authored by Fatim Din Mohamedi, Yushwan Han, and Mahmood Shafi. We are article.tv, links in the description below.