Based on ecologicalindex(EI)data of Dalian from 2013 to 2020 and social,economic,population,nature,energy and pollution emission data of the same period,Pearson correlation coefficient method and SHAP machine learning model interpreter method were used to analyze the correlation between society,economy,population,nature,energy,pollution emission and ecological environment conditions.Four kinds of machine learning prediction models,namely random forest,support vector machine,extreme gradient boosting and artificial neural network,were constructed to simulate and predict the spatial differentiation of EI in Dalian.The results showed that EI was highly correlated with nature and population.Extreme gradient boosting model has the best performance,and the R2 of training set and test set are 0.999 and 0.756;sensitivity analysis showed that industrial water withdrawal had the most significant contribution to EI,and it was mainly a single factors;based on the best prediction model,the predicted EI value of Dalian in 2023 is 69.81,which can reflect a good spatial difference of the forecast results of various districts and counties in Dalian.