Metamodeling is a promising technique for alleviating the computational burden of building energy simulation. Although various machine learning (ML) algorithms have been applied, the interactive effects of multiple factors on ML algorithm performance remain unclear. In this study, six popular ML algorithms, including ridge regression, random forest, extreme gradient boosting (XGBoost), support vector regression (SVR), k-nearest neighbor (KNN) regression and multi-layer perceptron (MLP), were analyzed for a benchmark metamodeling problem in building energy simulation under the impacts of four factors: input dimension, sample size, degree of input-output sensitivity and hyperparameter optimization (HPO) technique. The results indicated that XGBoost had high model precision and strong robustness, while KNN and SVR performed poorly on the two metrics. Increasing the sample size could mitigate the impact of the other three factors on model precision, especially for MLP. The findings will assist designers, engineers and researchers in selecting suitable ML algorithms and HPO techniques based on the dataset’s characteristics and facilitate the application of metamodeling in design optimization, sensitivity analysis and decision-making processes.