Abstract:This paper proposes an indoor fingerprint localization algorithm based on KNN and XGBoost algorithm to address the problems that the localization accuracy of KNN algorithm needs to be improved and the stability of localization is poor.The algorithm first divides the sample set into a training set and a test set, RSSI data of AP in training set was used as features and coordinates were used as labels, and XGBoost algorithm was used for modeling. Secondly, the KNN model is integrated, the nearest neighbor set found by KNN algorithm is introduced into XGBoost model, and combined with the prediction results of individual XGBoost algorithm to achieve coordinate positioning.Finally, the effects of the algorithm′s K-value, number of regression trees, decision tree depth and learning rate on the error are investigated in a practical setting to determine the relevant parameters of the algorithm.The experimental results show that the average localization error of the proposed algorithm is 1.55 m, which is 24.76% and 11.93% less than that of the KNN algorithm and XGBoost algorithm, respectively, and the cumulative distribution function curve converges faster and has better localization performance.