## 4 Fingerprinting-Based Positioning with Spatial Side Information
### Pattern-Matching Methods
#### 4.4.2 Pattern-Matching Method 2-SingFingIn-AggPosOut  
The pattern-matching method 2-SingFingIn-AggPosOut uses spatial side information on the fingerprints. It produces the position estimate by aggregating the position estimates for each sub-tile in a tile in the position domain. This method is depicted in Figure 9(c).  
The method consists of calculating a position estimate from a single sub-tile independently from the others for all of the sub-tiles in a tile. This method can be thought of as an extension of the pointwise case, in which the method 1-SingFingIn-PosOut is applied to each sub-tile instead of to a single sub-tile. Then, there is a position estimate for each sub-tile. The position estimates for all of the sub-tiles are aggregated in the position domain to produce a final position estimate for the tile. This is similar to sampling the pointwise positions in a small area sequentially in the time domain by means of a single sensor or receiver, with posterior aggregation of the position estimates. The difference here is that we take many samples at once using the 2D sensor array.  
In the training phase, an FFNN with \(N_{F}\) inputs, with one for each fingerprint, is trained as a regression model. The input to the NN is a vector with elements that form a set \(\mathcal{F}_{j}\) of \(N_{F}\) fingerprints. Here, \(j\) is a sub-tile from a set of \(N_{ST}\) sub-tiles from a fixed tile, with \(j\in\{1\ldots N_{ST}\}\). The training aims to map the input fingerprints associated with the sub-tile \(j\) to the reference position of sub-tile \(j\). We consider here a case in which there is a single and common NN trained against the fingerprints for \(N_{ST}\) sub-tiles. The final goal is to tune the parameters in the NN to produce as the output a position estimate for the reference position of the sub-tile associated with a given set of input fingerprints.  
In the testing phase, the FFNN takes as its input one vector with elements that form a set of fingerprints \(\mathcal{F}_{j}\) from one sub-tile \(j\) in a moving tile, with \(j\in\{1\ldots N_{ST}\}\). The FFNN produces as its output a position estimate for the sub-tile \(j\), with the coordinates \(\hat{x}_{\mathcal{F}_{j}}\) and \(\hat{y}_{\mathcal{F}_{j}}\). Here, each one of the \(N_{ST}\) vectors of fingerprints is associated with each one of \(N_{ST}\) sub-tiles. This process is repeated for each one of the \(N_{ST}\) sub-tiles in the moving tile. Finally, the \(N_{ST}\) position estimates for each sub-tile are aggregated to produce a final position estimate for the tile, with the position coordinates \(\hat{x}_{\mathcal{F}}\) and \(\hat{y}_{\mathcal{F}}\). In the implementation of this pattern-matching method, the position estimates for each sub-tile are aggregated by the mean value:  
\[\hat{x}_{\mathcal{F}}=\frac{1}{N_{ST}}\sum_{j\in\mathrm{1}...N_{ST}}\hat{x}_{ \mathcal{F}_{j}}, \tag{2}\]  
and  
\[\hat{y}_{\mathcal{F}}=\frac{1}{N_{ST}}\sum_{j\in\mathrm{1}...N_{ST}}\hat{y}_{ \mathcal{F}_{j}}. \tag{3}\]  
We note that the mean value in Equations (2) and (3) is a simplification of an averaging operation in which it is assumed that the reference position of a tile is the center of the tile, and the reference position of a sub-tile is the center of the sub-tile. With this assumption, an offset, positive or negative, from the center of the tile is incorporated into the estimated position of each sub-tile, in the sense that this offset is present in the training phase. Then, by considering as the reference position the center of the tile, the positive and negative offsets of the sub-tiles from the center of the tile are canceled out in the sum, and therefore, it is not necessary to include these in the equations.