# Indoor Localization System Using Fingerprinting and Novelty Detection for Evaluation of Confidence
## 3 LocFiND--Localization Using Fingerprinting and Novelty Detection  
In this section, we present our proposed solution called LocFiND (Localization using Fingerprinting and Novelty Detection). The main objective of our solution is to provide the location of mobile devices in indoor environments for different location-based services. In this type of environment, it is expected that the traditional solutions (e.g., GNSS, GPS) will not work very well [42]. We propose three variations of our solution: a naive one that uses only the prediction probability and two extended versions that use novelty detection to refine the results. In these applications, it is common for the person to be located to carry some type of device, that can be used to estimate your location. Another requirement of our application is that this mobile device needs to be low-profile, i.e., each person carries a very small, battery-powered device. To enable localization, our mobile nodes send information to Bluetooth-based anchor nodes so that there is lower interference with the wireless data network at the location. As in other solutions, LocFiND can be divided into two distinct phases, as depicted in Figure 1. In the first, training phase, samples for training the algorithm are gathered. The obtained fingerprint database follows the format as described,  
\[A_{i}=\{RSS_{i,1},RSS_{i,2},\ldots,RSS_{i,n},CLASS_{i}\} \tag{1}\]  
where \(A_{i}\) is the collected packet set \(i\), \(RSS_{i,n}\) is the RSS of packet \(i\) received at anchor node \(n\), and \(CLASS_{i}\) is the class (or label) that can be mapped to the location at which the packet was sent. All of these data will be used by the supervised training algorithm to generate a model. For the label of the samples, two granularities were used. For room classification \(CLASS_{i}\) = {41, 57, 40, 53, 39, 47, 51, 62, 45, 43, 61, 46, 16, 63}, where each number represents the ID of a room. For the classification of specific points inside rooms, the labels have the format R_X_Y that represents the R as the room ID, X as the line, and Y as the column inside the room (with cells of approximately 2 m \(\times\) 2 m). In the second, online phase, the procedures for estimating the localization of the mobile devices are executed. A centralized architecture was chosen mainly due to the limitations of the mobile nodes (e.g., energy savings and limited hardware). In this phase, a mobile node sends a data packet that will be received by the anchor nodes that will measure the RSS for this packet and forward the information to a central server. The server will then be able to estimate the location in which the packet was sent and, thus, the mobile device location. The central server uses a KNN algorithm with the fingerprint database from the training phase, thus will return not only the class but also the probabilities of the sample to belong to each one of the different classes. These probabilities will then be evaluated by our proposed approaches for the evaluation of confidence for the final classification. The similarity measuring metric used in KNN is the euclidean distance. As previously mentioned, RSS values have a variation even when the node is not moving. This is due to ambient characteristics and obstacles that can change the signal momentarily causing errors both in the training phase and in the online phase. Many works in the literature deal with the RS noise in the training phase [43], but the signal information in the online phase suffers from the same problem or worse since, in most cases, training is done in an empty building while the online phase occurs in a more crowded and dynamic scenario. Thus, we need solutions that also take into consideration the impact of this RSS variation in the online phase. An intuitive step would be to discard and ignore data where we have low confidence at the time of localization. However, after some time without localization information, this missing information will start being noticeable.