A New Hybrid Model for Mapping Spatial Accessibility to Healthcare Services Using Machine Learning Methods

: The unequal distribution of healthcare services is the main obstacle to achieving health equity and sustainable development goals. Spatial accessibility to healthcare services is an area of interest for health planners and policymakers. In this study, we focus on the spatial accessibility to four different types of healthcare services, including hospitals, pharmacies, clinics, and medical laboratories at Isfahan’s census blocks level, in a multivariate study. Regarding the nature of spatial accessibility, machine learning unsupervised clustering methods are utilized to analyze the spatial accessibility in the city. Initially, the study area was grouped into ﬁve clusters using three unsupervised clustering methods: K-Means, agglomerative, and bisecting K-Means. Then, the intersection of the results of the methods is considered to be conclusive evidence. Finally, using the conclusive evidence, a supervised clustering method, KNN, was applied to generate the map of the spatial accessibility situation in the study area. The ﬁndings of this study show that 47%, 22%, and 31% of city blocks in the study area have rich, medium, and poor spatial accessibility, respectively. Additionally, according to the study results, the healthcare services development is structured in a linear pattern along a historical avenue, Chaharbagh. Although the scope of this study was limited in terms of the supply and demand rates, this work gives more information and spatial insights for researchers, planners, and policymakers aiming to improve accessibility to healthcare and sustainable urban development. As a recommendation for further research work, it is suggested that other inﬂuencing factors, such as the demand and supply rates, should be integrated into the method.


Introduction
Health equity is an essential cornerstone of social justice [1,2]. The fact is that healthcare services are often scanty, heterogeneously distributed, and costly [3]. The issues that prevent health equity have a social, economic, ethical, cultural, or environmental nature [4]. Accessibility to healthcare services is a multifaceted barrier to achieving health equity. An accessible healthcare facility offers the opportunity for health maintenance and disease treatment [5]. Therefore, in recent years, understanding the healthcare accessibility situation has gained attraction, especially among health and urban policymakers.
Accessibility, the ease of reaching destinations, is a function of non-spatial and spatial factors [6]. Non-spatial factors are affordability (i.e., health spending), acceptability (i.e., health service compliance and satisfaction), and accommodation (i.e., suitability of healthcare services) [7]. Spatial factors are availability (i.e., the number of local services from which a client can choose) and spatial accessibility (i.e., travel impedance (distance or time) between a patient location and services) [8,9].
In Isfahan, one of the major cities in Iran, the development of healthcare services has not paralleled the spatial and demographic population growth [10]. To our knowledge, few studies investigated the spatial accessibility situation in Isfahan [11]. However, these studies did not provide enough information on the spatial accessibility of each residential settlement to healthcare services. Today, Machine Learning (ML) algorithms are widely used for clustering untagged data. Thus, this study will evaluate the spatial accessibility to healthcare in Isfahan, Iran, at the city block level using ML methods. This study will provide fresh insights into spatial accessibility to healthcare services since it considers all four healthcare services. Additionally, this work suggests a new framework for the classification of the study area using both unsupervised and supervised ML. Indeed, this study focuses on answering three following main research questions in Isfahan as a case study: • What are the drawbacks of current spatial accessibility measures and methods? • Are ML methods suitable for mapping spatial accessibility? • How is the spatial accessibility to healthcare facilities and services in Isfahan from an ML perspective?
The following section presents a literature review on spatial accessibility measures and methods. Section 3 presents the methods for spatial accessibility measurement in Isfahan. The results and findings of the study can be seen in Section 4. Section 5 provides a discussion of the results. Finally, Section 6 presents the study conclusion.

Literature Review and Background
Spatial accessibility refers to the relative ease of reaching the location of facilities and the type, quality, and quantity of activities offered. Glancing through the literature shows that spatial accessibility measurement has absorbed the attention of researchers and policy designation in different fields, such as urban planning and health policy and planning, since it is an essential measure for evaluating equity in opportunities or resources [12]. The multifaceted nature of accessibility has resulted in different spatial accessibility measures. The most intuitive spatial accessibility measure is the provider-to-population ratio [13]. The measure does not explicitly incorporate any measures of impedance between patients and practitioners [14]. Additionally, the Floating Catchment Areas (FCA) method is a traditional measure that calculates spatial accessibility regarding supply, demand, and impedance [15]. In this method, the ratio of providers to clients within a given impedance shows the spatial accessibility for each provider. Another popular and intuitive measure is the travel impedance to the nearest supplier [16]. The measure is considered to be a poor measure since it is only sensitive to the nearest supplier and regardless of other available providers. In addition, access score, a spatial accessibility measure, is a weighted measure; the method is based only on the relative importance of provider type [17]. As previously mentioned, the access score is based only on supply and impedance. Average travel impedance to the provider is an alternative measure [18]. Although it is a composite measure of accessibility and availability, it has a major problem. The providers near the study area boundary inflate the average distance. For example, a provider in the southern part of the city is not significant for northern residents. Gravity models, also named cumulative opportunity measures, are other types of spatial accessibility measurement that consider both accessibility and availability [19]. In addition to being counter-intuitive, it is a limited measure since it only models the supply. Joseph and Bantock suggested an adjustment demand factor to add the demand side into gravity models [20]. The proposed improved model requires an empirical investigation based on the type of urban facility and service and demanders. Besides the classic methods and measures mentioned so far, some relatively new methods exist to address the spatial accessibility problem. Two-step floating catchment area (2SFCA) and its improvements are the most common. 2SFCA, hence the name, is calculated in two steps for a given impedance to the provider [21]. The two most popular 2SFCA improvements are Enhanced 2SFCA [22,23] and Three-Step FCA [24], which deal with some 2SFCA shortcomings. The problem with the methods is that they calculate the spatial accessibility in a specific impedance. At the time of writing, the latest spatial accessibility measure is a rational agent model by Saxon and Snow [25]. Like other recent methods, the problem is that the model shows spatial accessibility in a given impedance.
As mentioned so far, current measures have two significant issues. First, a part of the spatial accessibility measures ignores a spatial accessibility factor. For example, the provider-to-population ratio neglects the spatial impedance, such as travel time between the patient and practitioner [14]. Second, the other measures based on all spatial accessibility factors reveal the spatial accessibility based on a given impedance. In other words, the measures assume that the population is willing to travel within a specific distance or time from their locations [26,27]. The problem becomes significant when a facility is near an impedance boundary but out of the impedance boundary. To illustrate, imagine there are two demand points with the same population. The specific impedance is 5 km. The two demanders have no access to a facility within 5 km, but there is a facility 6 km far from one of the demanders. The demander who can reach a service by taking 6 km has better spatial accessibility than the other. According to existing measures, the two demanders get the same spatial accessibility. The problem comes from the measures assessing the spatial accessibility of a given impedance.
A fixed impedance also makes the comparison between two states or counties a problematic task. Since the impedance between the demanders and facilities is a function of the population willing to travel, the impedance varies from county to county or state to state. Therefore, the results will be something like that: for example, the mean spatial accessibility for state A with a given impedance of 30 min is 0.5 and for state B with a given impedance of 25 min is 0.6. The question here is which state has better spatial accessibility and how a central government can compare the two states regarding spatial accessibility equity. In addition to the problems, the measures usually return different results for a study area. The lack of reliable information to confirm the methods' results is one of the most significant drawbacks of such studies [28].
Today, ML, an application of artificial intelligence, is well-known in healthcare and accessibility studies [29,30]. ML allows data clustering without being explicitly programmed [31,32]. There are four primary forms of learning for a machine: supervised, unsupervised, semi-supervised, and reinforcement learning [33]. In supervised or semisupervised learning, a machine learns from a training dataset (tagged data). Reinforcement learning simply works and learns based on reward functions. In detail, the methods require reliable information or a function to approve the results [34]. Unlike the methods, an unsupervised learning method learns patterns from untagged data. Unsupervised learning is training a machine using neither classified nor labeled information and allowing the algorithm to act on that information without guidance [35].
Given that there is no authoritative information on spatial accessibility, the problem is a type of unsupervised learning for a machine. Here, the task of the machine is to group information according to similarities, patterns, and differences without prior training in data. Grouping unlabeled examples are called clustering. This study aims to cluster census blocks in Isfahan based on their spatial distribution (the impedance between blocks and nearest healthcare services).

Case Study
The case study is Isfahan, Iran, with an estimated population of around 2.2 million people [36]. Isfahan is one of the largest and most important cities in Iran and is located at the crossroads of the country's main north-south and east-west routes. Isfahan's area is about 550 km 2 , and its height above sea level is 1590 m. The metropolitan area has a 2% increase in population yearly. This area has 31 hospitals, 105 clinics, 86 medical laboratories, and 346 pharmacies. Figure 1 shows the study area location.
at the crossroads of the country's main north-south and east-west routes. Isfahan's is about 550 km 2 , and its height above sea level is 1590 m. The metropolitan area has a increase in population yearly. This area has 31 hospitals, 105 clinics, 86 medical labor ries, and 346 pharmacies. Figure 1 shows the study area location.

Data
The population information is obtained from the 2016 census blocks, the latest a able census survey in Iran [36]. The blocks centroids are considered to be the popula centers. Additionally, the healthcare services locations were obtained from diffe sources, including the ministry of health and medical education data, OpenStreetM (OSM), and Isfahan municipality. Finally, the OSM street network was utilized to mea the impedance between the blocks and healthcare services. Due to data limitations, paper cannot provide a view of spatial accessibility in Isfahan, in which the demand supply rates are considered.

Methodology
Several methods currently exist for the measurement of spatial accessibility. The for spatial accessibility measurement is unlabeled. In other words, there is no autho tive information to confirm that a place has good spatial accessibility. Although it is sible to propose standards for evaluating spatial accessibility, the standard must cons several social, economic, and demographic parameters [37].
In this study, ML algorithms that optimized to cluster unlabeled data were util [38]. The two most well-known ML methods for unsupervised clustering are dista based [39] and hierarchical methods [40]. In a distance-based method, clusters are tained by first defining an appropriate distance measure and then applying an algori that assigns observations close to each other to the same cluster. K-Means algorithm is most common distance-based algorithm [41]. The K-Means clustering algorithm is a erative process that tries to minimize the distance of the data point from the average point in the cluster [42]. Hierarchical clustering methods seek to create a hierarchy of c tered data points. The endpoint is a set of clusters where each cluster is distinct from other cluster, and the objects within each cluster are broadly similar. Agglomerative c

Data
The population information is obtained from the 2016 census blocks, the latest available census survey in Iran [37]. The blocks centroids are considered to be the population centers. Additionally, the healthcare services locations were obtained from different sources, including the ministry of health and medical education data, OpenStreetMap (OSM), and Isfahan municipality. Finally, the OSM street network was utilized to measure the impedance between the blocks and healthcare services. Due to data limitations, this paper cannot provide a view of spatial accessibility in Isfahan, in which the demand and supply rates are considered.

Methodology
Several methods currently exist for the measurement of spatial accessibility. The data for spatial accessibility measurement is unlabeled. In other words, there is no authoritative information to confirm that a place has good spatial accessibility. Although it is possible to propose standards for evaluating spatial accessibility, the standard must consider several social, economic, and demographic parameters [38].
In this study, ML algorithms that optimized to cluster unlabeled data were utilized [39]. The two most well-known ML methods for unsupervised clustering are distance-based [40] and hierarchical methods [41]. In a distance-based method, clusters are obtained by first defining an appropriate distance measure and then applying an algorithm that assigns observations close to each other to the same cluster. K-Means algorithm is the most common distance-based algorithm [42]. The K-Means clustering algorithm is an iterative process that tries to minimize the distance of the data point from the average data point in the cluster [43]. Hierarchical clustering methods seek to create a hierarchy of clustered data points. The endpoint is a set of clusters where each cluster is distinct from the other cluster, and the objects within each cluster are broadly similar. Agglomerative clustering is the most common type of hierarchical clustering [44]. In addition to the algorithms, there is another hybrid approach between distance-based and hierarchical clustering [45]. The algorithm is a modification of the K-Means algorithm and produces hierarchical clustering named bisecting clustering. Instead of clustering the data into k clusters in each iteration, the algorithm splits one cluster into two sub clusters at each bisecting step (using K-Means) until k clusters are obtained.
In this study, spatial accessibility of the Isfahan blocks to healthcare services was evaluated using a distance-based (K-Means), a hierarchical (agglomerative), and a hybrid method between them (bisecting K-Means) as follows: The study variables are block center distances to the nearest services. The street network of OSM in Isfahan was utilized to calculate the distances. For each block and healthcare service centroid, the closest node on the street network was obtained, and then the shortest distance between the nodes was calculated using Dijkstra's algorithm. Dijkstra's algorithm finds the shortest path between two nodes by building a shortest-path tree and stopping once the destination node has been reached [46]. The method was implemented using the NetworkX package in the Python programming environment [47].

Weighting Variables
Clearly, in a multivariate study, variables have different levels of importance. By calculating the entropy value, the entropy weight method can judge an event's randomness and dispersion degree. The method measures value dispersion in decision-making. The more dispersion, the more information can be derived. Meanwhile, a higher weight should be given to the factor and vice versa [48].
The entropy by Shannon determines the disorder's degree and its utility in system information. The greater the entropy value is, the more significant the disorder degree of the system is. The entropy weight method is based on the amount of information to determine the variable's weight, which is one of the objective fixed weight methods [49]. In this paper, the entropy weighting method is adopted to determine the weight of variables. The entropy weights are calculated in three steps, including normalization, entropy measurement, and weight calculation as follows:

Normalization of Variables
The first step to measuring a variable's entropy weights is to normalize the variable's values. Additionally, the algorithms that compute the distance between the features, such as K-Means, are biased towards numerically larger values if the data is not scaled [50]. Therefore, scaling is one of ML's most important data preprocessing steps. Normalization is a scaling technique in which values are shifted and rescaled to a range between 0 and 1. It is also known as Min-Max scaling. In this study, the variables are rescaled using Min-Max scaling. Equation (1) shows the Min-Max scaling formula for variable i and sample j.
where X max and X min are the variable's maximum and minimum values, respectively.

Calculation of the Variable's Entropy
According to the definition of entropy [51], the entropy of the ith variable is determined by Equation (2).
Calculation of the Variable's Entropy Weight The range of entropy value E i is [0, 1]. The larger the E i , the greater the differentiation degree of variable i, and more information can be derived. Hence, a higher weight should be given to the variable. Therefore, in the entropy weighting method, the weight calculation method is according to Equation (3).  [52]. Power transforms are functions that transform numerical features into a more convenient form, to conform better to a normal distribution. Yeo-Johnson power transform, a family of parametric, monotonic transformations, was applied to make data more Gaussian-like (normal distribution) in this study [53]. The idea of a power transformer is to increase the symmetry of the distribution of the features [54,55]. An asymmetric feature would be more symmetric after applying a power transformation.

Choosing the Number of Clusters k
A fundamental step for any unsupervised algorithm is determining the optimal number of clusters into which the data may be clustered [56]. The Elbow method is one of the most popular methods to determine this optimal value of k [57]. To determine the optimal number of clusters, we have to select the value of k at the "elbow", i.e., the point after which the distortion/inertia starts decreasing linearly.
The steps for calculating the optimal number of clusters are as follows: 1.
Calculating distortion: It is calculated as the average of the squared distances from the cluster centers of the respective clusters to samples (census blocks' centroid). Often, the Euclidean distance metric is used.

2.
Calculating inertia: It is the sum of squared distances of samples to their closest cluster center.

K-Means Clustering
A K-Means clustering algorithm aims to partition n observations into k clusters in which each observation belongs to the cluster with the nearest mean. To make the clusters, three steps are followed:

1.
Selecting k random blocks from the data as centroids 2.
Assign all the blocks to the closest cluster centroid 3.
Computing the centroids of newly formed clusters 4.
Repeat steps 3 and 4 The algorithm stops when blocks remain in the same cluster [58].

Agglomerative Clustering
Agglomerative clustering aims to group objects in clusters based on their similarity. The algorithm starts by treating each object as a singleton cluster. Next, pairs of clusters are successively merged until all clusters have been merged into one big cluster containing all objects [59].

Bisecting K-Means
A combination of K-Means and hierarchical clustering is called Bisecting K-Means. Instead of dividing the data into 'k' clusters in each iteration, Bisecting K-Means separates one cluster into two sub-clusters at each bisecting step (by using K-Means) until k clusters are obtained [60].

Spatial Accessibility Map
In this study, it is assumed that places that have the same spatial accessibility level by different methods are conclusive evidence. Therefore, the places can be training data for other places. In detail, supervised ML using conclusive evidence was applied to the study area for clustering.
The conclusive evidence was randomly split into a training set (80%) used for fitting the models and a test set (or validation set, 20%) on which accuracy was estimated. The six most common supervised learning algorithms include Logistic Regression (LR), Linear  [61] were compared to find the most accurate method. The KNN algorithm showed the best fit and accuracy on the dataset. Hence, the final map of spatial accessibility in the study area was obtained from KNN supervised ML.
Like all spatial models, the final spatial accessibility map contains uncertainty. There is a wide different and diverse sources of uncertainty in this study and similar research [62] such as ignorance of human knowledge and original data and measurement error. Regarding the many-sided source of uncertainty, this study did not tackle uncertainty problem.

Results
An unsupervised ML algorithm was used to segregate the study area, Isfahan, based on the spatial accessibility level of urban blocks to the nearest healthcare services. All parts of the proposed method were implemented in Python programming language. The most utilized Python's packages in this study were scikit-learn for performing machine learning algorithms [63], and matplotlib package for visualizing results [64]. Figure 2 shows the computed distances from each block centroid to the closest immediate healthcare service.
As Figure 3 shows, the study variables are of different scales. A power transformation was used to transform the data to the same scale. The transformation converts variables to a Gaussian-like form that is essential for ML tasks. The results of the power transformation are shown in Figure 3.

Spatial Accessibility Map
In this study, it is assumed that places that have the same spatial accessibility level by different methods are conclusive evidence. Therefore, the places can be training data for other places. In detail, supervised ML using conclusive evidence was applied to the study area for clustering.
The conclusive evidence was randomly split into a training set (80%) used for fitting the models and a test set (or validation set, 20%) on which accuracy was estimated. The six most common supervised learning algorithms include Logistic Regression (LR), Linear Discriminant Analysis (LDA), K-Nearest Neighbors (KNN), Classification and, Regression Trees (CART), Gaussian Naive Bayes (NB), and Support Vector Machines (SVM) [60] were compared to find the most accurate method. The KNN algorithm showed the best fit and accuracy on the dataset. Hence, the final map of spatial accessibility in the study area was obtained from KNN supervised ML.
Like all spatial models, the final spatial accessibility map contains uncertainty. There is a wide different and diverse sources of uncertainty in this study and similar research [61] such as ignorance of human knowledge and original data and measurement error. Regarding the many-sided source of uncertainty, this study did not tackle uncertainty problem.

Results
An unsupervised ML algorithm was used to segregate the study area, Isfahan, based on the spatial accessibility level of urban blocks to the nearest healthcare services. All parts of the proposed method were implemented in Python programming language. The most utilized Python's packages in this study were scikit-learn for performing machine learning algorithms [62], and matplotlib package for visualizing results [63]. Figure 2 shows the computed distances from each block centroid to the closest immediate healthcare service. As Figure 3 shows, the study variables are of different scales. A power transformation was used to transform the data to the same scale. The transformation converts variables to a Gaussian-like form that is essential for ML tasks. The results of the power transformation are shown in Figure 3.  As Figure 3 shows, the study variables are of different scales. A power transformation was used to transform the data to the same scale. The transformation converts variables to a Gaussian-like form that is essential for ML tasks. The results of the power transformation are shown in Figure 3.  The study variable was prioritized using a weighting method based on the Shannon entropy. Table 1 provides the results obtained from entropy weighting. One of the great frustrations in performing a cluster analysis is determining the correct number of clusters. In this study, the elbow method that was utilized to find the optimal number of clusters reveals the number 5. Therefore, the clustering results were assigned to a 5-points Likert scale, including very low, low, medium, high, and very high spatial accessibility. Maroon color refers to the very low; orange shows the low; yellow is the medium; light green shows the high; and dark green means the very high spatial accessibility. Figure 4 is a graphical presentation of the elbow method result. The study variable was prioritized using a weighting method based on the Shannon entropy. Table 1 provides the results obtained from entropy weighting. One of the great frustrations in performing a cluster analysis is determining the correct number of clusters. In this study, the elbow method that was utilized to find the optimal number of clusters reveals the number 5. Therefore, the clustering results were assigned to a 5-points Likert scale, including very low, low, medium, high, and very high spatial accessibility. Maroon color refers to the very low; orange shows the low; yellow is the medium; light green shows the high; and dark green means the very high spatial accessibility. Figure 4 is a graphical presentation of the elbow method result. In this study, three different clustering methods were utilized. The results of the clustering methods, including K-Means, agglomerative, and bisecting K-Means, are presented in Figures 5, 6 and 7, respectively.  In this study, three different clustering methods were utilized. The results of the clustering methods, including K-Means, agglomerative, and bisecting K-Means, are presented in Figures 5-7, respectively.  In this study, three different clustering methods were utilized. The results of the clustering methods, including K-Means, agglomerative, and bisecting K-Means, are presented in Figures 5, 6 and 7, respectively.   The intersection of the three methods, the places that have the same results by different methods, is shown in Figure 8.  The intersection of the three methods, the places that have the same results by different methods, is shown in Figure 8. The intersection of the three methods, the places that have the same results by different methods, is shown in Figure 8. The findings presented in Figure 7 were used as an input for supervised ML. A comparison between six algorithms in terms of accuracy was done to find the best supervised algorithms. As shown in Figure 9, the KNN and CART methods have higher accuracy than the other methods. Although KNN and CART methods do not differ significantly, KNN was selected for two reasons in this study. First, it is the most intuitive classifier, which is simple to understand and explain. Second, KNN is non-parametric. Therefore, it does not have any assumptions about the shape of the data distribution [64].  The findings presented in Figure 7 were used as an input for supervised ML. A comparison between six algorithms in terms of accuracy was done to find the best supervised algorithms. As shown in Figure 9, the KNN and CART methods have higher accuracy than the other methods. Although KNN and CART methods do not differ significantly, KNN was selected for two reasons in this study. First, it is the most intuitive classifier, which is simple to understand and explain. Second, KNN is non-parametric. Therefore, it does not have any assumptions about the shape of the data distribution [65]. The findings presented in Figure 7 were used as an input for supervised ML. A comparison between six algorithms in terms of accuracy was done to find the best supervised algorithms. As shown in Figure 9, the KNN and CART methods have higher accuracy than the other methods. Although KNN and CART methods do not differ significantly, KNN was selected for two reasons in this study. First, it is the most intuitive classifier, which is simple to understand and explain. Second, KNN is non-parametric. Therefore, it does not have any assumptions about the shape of the data distribution [64].  The final map of spatial accessibility in the study area was obtained from a KNN ML clustering and is presented in Figure 10. The final map of spatial accessibility in the study area was obtained from a KNN ML clustering and is presented in Figure 10. The quantified results of the study are shown in Figure 11. These charts show the proportion of each cluster in the study.

Discussion
This paper demonstrates the potential applications of ML clustering methods to group city blocks based on the spatial accessibility to the nearest healthcare services in Isfahan. Regarding spatial accessibility, it is an unsupervised problem in terms of clustering. Hence, in this study, the spatial accessibility of the study area was evaluated using three unsupervised clustering methods. The intersection of the three methods is considered to be conclusive evidence. Using conclusive evidence, the best supervised clustering The quantified results of the study are shown in Figure 11. These charts show the proportion of each cluster in the study. The final map of spatial accessibility in the study area was obtained from a KNN ML clustering and is presented in Figure 10. The quantified results of the study are shown in Figure 11. These charts show the proportion of each cluster in the study.

Discussion
This paper demonstrates the potential applications of ML clustering methods to group city blocks based on the spatial accessibility to the nearest healthcare services in Isfahan. Regarding spatial accessibility, it is an unsupervised problem in terms of clustering. Hence, in this study, the spatial accessibility of the study area was evaluated using three unsupervised clustering methods. The intersection of the three methods is considered to be conclusive evidence. Using conclusive evidence, the best supervised clustering

Discussion
This paper demonstrates the potential applications of ML clustering methods to group city blocks based on the spatial accessibility to the nearest healthcare services in Isfahan. Regarding spatial accessibility, it is an unsupervised problem in terms of clustering. Hence, in this study, the spatial accessibility of the study area was evaluated using three unsupervised clustering methods. The intersection of the three methods is considered to be conclusive evidence. Using conclusive evidence, the best supervised clustering method for the study data in terms of accuracy, KNN, was applied to compose the spatial accessibility final map. The final results of the study are categorized into five clusters.
Almost 31% of blocks have a low or very low level of spatial accessibility, and 47% have a high or very high level. Therefore, it can be said that most of the study area has a good level of spatial accessibility, according to our study results. If we split the study area into three columns, most of the blocks with a very high or high spatial accessibility fall within the central column. The most notable feature in this part is a historical avenue, Chaharbagh. This path connects the northern sections of the city to the southern ones and is about 6 km long. Like many commercial properties, healthcare services have been established near the avenue. It is essential to highlight that the study considers the people within the city border. Therefore, this study ignores people living outside the city boundary and using the city healthcare facilities [66].
Furthermore, except for the north of the study area, the margin blocks have the lowest spatial accessibility level. The presence of healthcare services in the northern areas and a health complex led to a good level of spatial accessibility in the parts. The spatial accessibility level increases by moving from margin areas to the study area center. The most apparent reason for the finding is a clear imbalance between urban sprawl and healthcare services distribution [67].

Conclusions
Using ML, this study examined spatial accessibility to four healthcare services, including hospitals, pharmacies, clinics, and medical laboratories in Isfahan. Like many urban sustainability problems, spatial accessibility is a type of unsupervised learning for a machine. This study suggests a framework for mapping spatial accessibility using unsupervised and supervised ML methods. The framework can be used for other urban services and many urban environmental problems.
This study categorizes the area into five groups regarding spatial accessibility, providing helpful information for policymakers to allocate health resources. This study has found that almost 47%, 22%, and 31% of the study area have rich, medium, and poor spatial accessibility, respectively. The research has also shown that if we split the study area into three columns, the central part has the best spatial accessibility situation. Furthermore, the study suggests that margin areas have the lowest levels of spatial accessibility. The findings will be of interest to decide the place of new healthcare services or change of the existing services. Additionally, the study results would be useful in emergency conditions since the proposed method is independent of supply and demand values and the model variables are the shortest path to the nearest healthcare services.
The scope of this study was limited in terms of the supply and demand rates. Notwithstanding the limitation, the study offers insights into the impedance between census blocks and healthcare services. More information on the supply and demand rates would help us establish a higher accuracy on this matter. Hence, a natural progression of this work is to analyze spatial accessibility considering the amount of supply in services and the amount of demand in census blocks. As the final point, this study considers healthcare services and census blocks to be two-dimensional (latitude and longitude) points. In practice, a healthcare service may be on n-floor of a building. In addition, the census blocks have different heights. For example, people who live on n-floor of a skyscraper would have lower accessibility than people who live at ground level [68]. Therefore, new insights about the current situation of spatial accessibility are gained if three-dimensional variables are included in this study.