{'fraction_non_alphanumeric': 0.01644100580270793, 'fraction_numerical': 0.005802707930367505, 'mean_word_length': 5.310975609756097, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Improved Adaptive Weighted Gaussian Nearest Neighbor Classification Method

The category of a test sample is decided by the template sample which has the smallest distance to the tested one for the traditional nearest neighbor algorithm, which may cause the sample to be misjudged. In order to improve the correct classification rate, more template samples should participate in decision-making. Therefore, the item of class distance used to classify the test sample is proposed in this paper, which is relative to several template samples selected adaptively. The Gaussian function is employed in the class distance because of its better clustering. To verify the merit of the improved methods, experiments of grading 1588 tobacco leaves belonging to 41 levels by the nearest neighbor algorithm, its improved methods, SVM, SRC, BP, RF and Adaboost have been implemented under the same conditions. The experimental results show that the adaptive weighted Gaussian nearest neighbor has better recognition ability than other methods.