{'fraction_non_alphanumeric': 0.017797552836484983, 'fraction_numerical': 0.0, 'mean_word_length': 5.7669172932330826, '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}}
Enhancing k-Nearest Neighbors through Learning Transformation Functions by Genetic Programming

The k-nearest neighbors algorithm (kNN) is renowned for solving classification tasks. The notion of kNN is to seek similar data instances in the dataset as prediction reference, for which the similarity between instances is ordinarily measured by Euclidean distance. Recently, some studies propose problem-tailored distance metrics to improve the classification performance of kNN. In this paper, we utilize genetic programming to learn the transformation function, which interprets the relationship of two data instances into a scalar differential. The differential of data pairs indicates the dissimilarity between two instances. This study considers two forms of transformation functions. Experimental results show the transform functions learned by GP can effectively enhance the performance of kNN.