Abstract:This paper proposes an information complementation algorithm of K nearest neighbor-random forest with an improved distance formula, aiming at the problem of indoor fingerprint localization fingerprint database data in the real environment with missing data leading to large positioning errors.First, the gathered fingerprint data is preprocessed using Gaussian filtering to eliminate interfering data points and enhance data dependability.Second, the nearest-neighbor set is sampled using the KNN algorithm, which combines Manhattan distance and Euclidean distance.The RF algorithm is then used to optimize the training of the nearest-neighbor set, and the prediction results of each individual decision tree are averaged to determine the predicted values of the missing data.This process is based on the division of the fingerprint data into training and testing sets.Finally, the improved complementary algorithm is compared with KNN, improved KNN,RF and KNN-RF complementary algorithms.The experimental results demonstrate that the modified complementary method in this study has superior prediction accuracy and precision than other algorithms, with a prediction accuracy of 91.3%.In the meantime, the fingerprint library of this paper′s complimentary algorithm has an average positioning error of 1.82 m, which is 1.6%~7.2% less than that of other complementary algorithms, and the positioning performance is improved.