{'fraction_non_alphanumeric': 0.02756892230576441, 'fraction_numerical': 0.0, 'mean_word_length': 4.872549019607843, '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}}
K-means clustering algorithm and Python implementation

K-means is a commonly used algorithm in machine learning. It is an unsupervised learning algorithm. It is regularly used for data clustering. Only the number of clusters are needed to be specified for it to automatically aggregate the data into multiple categories, the similarity between data in the same cluster is high, thus, the similarity of data in different clusters is low. K-means algorithm is a typical distance-based clustering algorithm. It takes distance as the evaluation index of similarity, that is, the closer the distance between two objects, the greater similarity. Clustering is also extremely extensive in practical applications, such as: market segmentation, social network analysis, organized computing clusters, and astronomical data analysis. This paper is my own attempt to make K-means code and API, using Python and Java to jointly complete a project. The Python is mainly used to write the framework of the core algorithm of K-means, and the Java to create experimental data. In this research report, I will describe the simple data model provided by K-means, as well as the design and implementation of K-means.