{'fraction_non_alphanumeric': 0.022919179734620022, 'fraction_numerical': 0.013268998793727383, 'mean_word_length': 4.946236559139785, '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}}
Improved K-means algorithm based on relative mass and force range radius of the data field

Among all the clustering problems, K-means clustering is probably the most well-known one. To address the problem that the traditional K-means algorithm selects the clustering centroids randomly and leads to unstable clustering results and easy to fall into local optimal solutions, we introduce the data field into number field space by borrowing the idea of inter-particle interaction in the physical field, study the gravitational relationship between data points and influence factor in the data field, and propose the relative mass algorithm based on the data field, which is referred to as RM algorithm in the following. In the data field, the points with larger masses are calculated and selected as the initial clustering centroids by the RM algorithm, and the K-means algorithm is improved based on the relative masses of data points and the force range radius based on the data field, respectively, and then the effectiveness of the improved algorithm is verified on several publicly available datasets, and finally the improved K-means algorithm based on the force range radius of the data field is tested in a distributed cluster. The experimental results show that (1) compared with the traditional K-means algorithm, both improved K-means algorithms reduce the number of iterations and the clustering time, and the clustering effect is better. (2) The data size increased from 10, 000 to 100, 000, the number of nodes increased from 1 to 5, the speedup ratio of parallel computing increased to 1.91, and the computational efficiency improved by 33.03%.