{'fraction_non_alphanumeric': 0.025594149908592323, 'fraction_numerical': 0.0, 'mean_word_length': 4.768421052631579, '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}}
Fast k-NN classification rule using metric on space-filling curves

A fast nearest neighbor algorithm for pattern classification is proposed and tested on real data. The patterns (points in d-dimensional Euclidean space) are sorted along a space-filling curve. This way the multi-dimensional problem is compressed to the simplest case of the nearest neighbor search in one dimension. Instead of Euclidean distance a metric on space-filling curve is used. The method may be inferior or superior to the k-NN rule in multidimensional Euclidean space.