{'fraction_non_alphanumeric': 0.02754237288135593, 'fraction_numerical': 0.0, 'mean_word_length': 5.428571428571429, '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}}
CW-kNN: an efficient kNN-based model for imbalanced dataset classification

K nearest neighbor (kNN) method is a popular classification method in data mining because of its simple implementation and significant classification performance. However, kNN do not scale well to big datasets. In this paper, CLUKER, a novel kNN regression method based on hierarchical clustering, is proposed. CLUKER uses hierarchical clustering to divide the original dataset into several parts, effectively reducing the query scope of kNN. Moreover, in order to improve kNN's ability to handle imbalanced datasets, this paper proposes a novel weighting method based on local data distribution, called LD-Weighting method. In the end, having integrated the two algorithms, this paper proposes an efficient kNN-based model for imbalanced dataset classification called CW-kNN. The experimental results show that the proposed methods perform well on different datasets.