# Statistical Model for Mobile User Positioning Based on Social Information
## 3 Methodology
### Preprocessing  
Although the E-CID method does not rely on users' GPS coordinates, it makes use of data precisely located (e.g., server cell GPS coordinates), and, thus, this data supports the positioning process. This approximation of users' location has great inaccuracies, so it is optimized applying other data, such as Timing Advance measurements. This is the approach followed in this work, where users' environment information (e.g., indoor/outdoor labeling or population density) is determined through external data sources (i.e., land uses or posts from social networks) precisely located with geopositioning metadata and applied to enhance the optimization of users positioning.  
The first essential element for the development of this work is to know the context of each user. As this information is not recorded in the OSS, operators need to estimate it. This is achieved with the algorithm described in [37], where the probability that a user has established the connection indoors (i.e., \(P_{indoor}(k)\)) or outdoors (i.e., \(P_{outdoor}(k)=1-P_{indoor}(k)\)) is estimated from its radio indicators.  
After this, the next thing is to know the information of where the buildings are located (i.e., indoor) and which areas of the scenario are uncovered (i.e., outdoor). To do this, a land use map, \(M_{lu}(x,y)\), is constructed from information obtained either from data portals provided by official sources or from open data platforms (e.g., OpenStreetMap). The information from these platforms is usually composed of a list of geometric elements (i.e., polygons, lines and points), each with a label defining its main social activity and a list with the GPS coordinates of the element vertices. Due to the large range of values that these labels can adopt, they are classified into different types of land use, while the vertices of each element determine the area of land that is classified.  
In this work, the E-CID is used to determine in which area of the scenario the connection is likely to occur. Using the E-CID, the possible area of establishment can be reduced to that area covered by the ring defined by the value of TA (i.e., \(N_{TA}\)) that obtains the connection within the serving cell. In this work, the ring area in a cell, \(R_{lu}(c)\), is defined as all those tiles where its distance to the serving cell, \(d_{sc}\), is in the range of the ring (i.e., \(78\cdot(N_{TA}-1)\leq d_{sc}<78\cdot N_{TA}\)). This is because the length of a ring in LTE is approximately \(78\) m.  
Finally, to estimate the spatial dispersion of the population, a matrix is constructed with equivalent dimensions to the land use map and, from the location information provided by the social networks, the number of geolocated posts per tile is added, generating a post distribution map, \(M_{p}(x,y)\). This matrix has the problem that, in areas of low population density (e.g., in open country), the average number of posts per tile is much less than one, causing most grids to have no posts or, in some cases, only a few appear. For better estimation of these small density values, a Kriging process is applied to obtain the underlying spatial distribution of publications, \(M^{\prime}_{p}(x,y)\). Kriging is a geostatistical interpolation process that, starting from reference points on a map, uses a variogram model to estimate the intermediate points. In simple Kriging processes, one of the most commonly used variogram models is the spherical variogram, defined as,  
\[v=\left\{\begin{array}{ll}\omega\bigg{[}\frac{3}{2}\big{(}\frac{|h|}{a}\big{)}- \frac{1}{2}\big{(}\frac{|h|}{a}\big{)}^{3}\bigg{]}&\text{if}\quad h<a\\ \omega&\text{if}\quad h>a\end{array}\right. \tag{1}\]  
where \(\omega\) is the threshold and \(a\) is the range of the variogram, while \(h\) is the vector of reference points.