# How Does the Built Environment Affect Mechanical Parking Space Planning: A Case Study in Xi'an City
## 2 Related Works
### The Research Method of the Relationship between Parking and Built Environment  
Traditional methods such as Ordinary Least Squares (OLSs) [30], the logit method [1] h, and Geographical Weighted Regression (GWR) [31] have been used to dig out the relationship between parking-related variables and built environment indicator systems. Machine learning, which has higher predictive performance, has been widely used in the transportation field [21; 32; 33; 34]. Due to higher predictive accuracy and operational efficiency, lots of researchers have used the Gradient Boosting Decision Tree (GBDT) model to analyze the influence of the built environment on travel-related variables [33; 35; 36], or to predict parking-related variables [21; 37].  
Machine learning algorithms are black box models, i.e., their inner workings are difficult to understand and explain [38]. The interpretability of machine learning has attracted much attention. Partial dependence plots (PDPs) and accumulated local effects (ALE) plots could describe how features affect the prediction of a machine learning model on average. The ALE method has three advantages: Firstly, the graph created by the ALE method is unbiased. As ALE can deal with the correlation between features, the graph produced is not affected by the joint effect. Secondly, ALE is faster than PDP and requires fewer computations than PDP, and thirdly, the interpretation of ALE graphs is very clear and unambiguous. By removing the effects of correlated variables, one can easily interpret the feature variables and model results [39].  
One of the difficulties in using machine learning methods is the interpretation of their results [40]. To overcome this problem, Shapley additive explanations (SHAPs), which are based on the classical Shapley values, are used to provide local explanations and give detailed feature importance and attribution at the level of individual observations. This method has brought great potential for understanding machine learning models of spatial data, as each observed value is geographically referenced and allows spatial visualization of any estimated feature attribution. The SHAP value of \(y_{i}\) for sample \(i\) is calculated by the sum of the predicted mean value of all samples and the SHAP value of sample \(x_{ij}\) (\(f\big{(}x_{ij}\big{)}\), which is the individual SHAP value. \(j\) is the feature \(j\)). When \(f\big{(}x_{ij}\big{)}>0\), it means that the feature enhances the prediction value and plays a positive role, and vice versa [41]. The implementation of local SHAP as SHAP is provided in software such as Python 3.12.3 and R 4.3.3. Machine learning methods such as GBDT, xgboost, and LightGBM can call the SHAP command in the scikit-learn package.  
Although the built environment and parking research methods use the advanced GBDT algorithm [29], there is almost no research on mechanical parking and the interpretability of variables and almost no research on the interpretation of local features. To address the unresolved issue in parking planning, the mechanical parking rate was selected as the dependent variable, and the variables based on the \"7D\" built environment indicator system were used as the independent variable. The GBDT model was used to establish the non-linear relationship to predict the mechanical parking spaces ratio, and then to interpret the predictions from both global and local perspectives and to reveal the contribution of each variable with the SHAP value. This research will provide a theoretical basis for the design and planning of mechanical parking spaces and lots.