Abstract:K-nearest neighbor (KNN) has yielded excellent performance in physiological signals based on emotion recognition. But there are still some issues:the majority vote only by the nearest neighbors is too simple to deal with complex (like skewed) class distribution; features with the same contribution to the similarity will degrade the classification accuracy; samples in boundaries between classes are easily misclassified when k is larger. Therefore, we propose an improved KNN algorithm called WB-KNN, which takes into account the weight (both features and classification) and boundaries between classes. Firstly, a novel weighting method based on the distance and farthest neighbors named WDF is proposed to weight the classification, which improves the voting accuracy by making the nearer neighbors contribute more to the classification and using the farthest neighbors to reduce the weight of non-target class. Secondly, feature weight is introduced into the distance formula, so that the significant features contribute more to the similarity than noisy or irrelevant features. Thirdly, a voting classifier is adopted in order to overcome the weakness of KNN in boundaries between classes by combining different classifiers. Results of WB-KNN algorithm are encouraging compared with the traditional KNN and other classification algorithms on the physiological dataset with a skewed class distribution. Classification accuracy for 29 participants achieves 94.219 2% for the recognition of four emotions.