## 3 Method
### Functional Type Identification of Buildings Containing POIs  
POI data describes the spatial locations and attributes of geographic entities. Each POI has a corresponding point entity. A building may contain multiple POIs; for example, stores in a shopping mall may correspond to multiple POIs, and different companies in an office building may correspond to different POIs. For buildings containing multiple POIs, the frequency density ratio method is used to count the distribution of POIs in each building unit and classify the building types accordingly. This can improve the accuracy of building function identification. The method of calculating the POI frequency density is shown by Formulas (1) and (2).  
\[\text{FD}_{\text{i}}=\frac{\text{n}_{\text{i}}}{\text{N}_{\text{i}}}(\text{i}= 1,2\ldots\ldots,\text{n}) \tag{1}\]  
\[\text{CR}_{\text{i}}=\frac{\text{FD}_{\text{i}}}{\sum_{\text{i}=1}^{\text{n}} \text{FD}_{\text{i}}}(\text{i}=1,2\ldots\ldots,\text{n}) \tag{2}\]  
where i denotes the POI class, \(\text{n}_{\text{i}}\) is the number of class i POIs within the building footprint, \(\text{N}_{\text{i}}\) is the total number of class i POIs in the POI dataset, \(\text{FD}_{\text{i}}\) denotes the frequency density of POI type i within the building footprint as a percentage of the POIs of that type, and \(\text{CR}_{\text{i}}\) denotes the frequency density of POI type i as a proportion of the frequency density of all POIs within the building footprint.  
The CR values are mapped to the functional attributes of the building and the optimal threshold of frequency density is determined after several trials to classify the functional type of the building. As a POI represents an information point, which may be a small convenience store, large shopping mall or residential building, it is not possible to represent the area occupied by different types of information points. So, the selection of thresholds should be carefully considered when classifying building functional types. In this paper, building functions are categorised as single function, mixed function, or integrated function. The best classification is obtained with a maximum CR threshold of 0.5 and a minimum threshold of 0.2.  
When the frequency density ratio of a single type of POI within the building footprint is >0.5, the building is considered to be single function, and this POI type is taken as the building's functional type. When there are two types of POI with frequency density ratios >0.5, the building function is categorised as mixed function. Common mixed-function building types are residential commercial mixed, commercial office mixed, and public services office mixed. When there are more than two POI types with frequency density ratios >0.5, the building is considered to have multiple functions.  
If all types of POIs within the scope of the building footprint have frequency density ratios <0.5, the building has a variety of functional types. Then, a minimum threshold of 0.2 is introduced to assist in delineating the building functions. When two POIs have frequency densities >0.2, the building is considered to be mixed function. When three or more POIs have frequency densities >0.2, or all POIs have frequency densities of 0-0.2, the building is considered to be combined function.