IEEE Access (Jan 2023)
The Improvement and Comparison Study of Distance Metrics for Machine Learning Algorithms for Indoor Wi-Fi Localization
Abstract
Accurate indoor positioning is crucial for many location-based services, but GPS accuracy is significantly reduced due to issues such as signal penetration and accuracy in indoor scenarios. In contrast, indoor Wi-Fi positioning is emerging as a promising alternative in the field. This study proposes a model that combines the k-nearest neighbor algorithm with the dynamic time regularization distance metric for indoor Wi-Fi positioning, and investigates methods for optimizing this model. The traditional K-nearest neighbor algorithm usually uses Euclidean distance for distance calculation, which has the disadvantage of being affected by the length of the signal sequence, resulting in inaccurate calculation of the distance between adjacent points with different time intervals. The dynamic time regularization is more suitable for signals of different lengths like Wi-Fi, which can bend the time axis to make the alignment of two Wi-Fi sequences more accurate. Using DTW as the distance measure of KNN is DTW-KNN. In addition, to enhance the model’s ability to handle large-scale data sets, We use Gaussian sum matrices instead of the distance matrix of the traditional dynamic time regularization algorithm. Once again, the standard deviation sigma of the Gaussian distribution and the distance hyperparameters of the K-nearest neighbors are optimally chosen for the most suitable values of Wi-Fi signals. Finally, a fast recognition model based on intermittent downsampling and an accurate recognition model with complete sampling are designed to cope with the focus on real-time and accuracy in different scenarios. These two models can achieve 95.3% and 98% accuracy, respectively, on the public dataset (Wireless Indoor Localization) of indoor Wi-Fi localization.
Keywords