<jupyter_start><jupyter_text>**Вывод:** K nearest neighbors не подходит.  K means<jupyter_code>from sklearn.cluster import KMeans
kmeans = KMeans(n_clusters=10).fit(fps)

predictions = kmeans.predict(fps)
#Draw.MolsToGridImage([Chem.MolFromSmiles(i) for i in all_smiles], molsPerRow=10, legends=[str(i) for i in predictions])
tmp = sorted(tuple(zip(predictions, all_smiles)))
labels = [i[0] for i in tmp]
new_smiles = [i[1] for i in tmp]

Draw.MolsToGridImage([Chem.MolFromSmiles(i) for i in new_smiles], molsPerRow=13)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13296903460837886, 'fraction_numerical': 0.014571948998178506, 'mean_word_length': 7.73015873015873, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '618858', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 228, 'n_tokens_neox': 220, 'n_words': 47, 'path': 'Render.ipynb', 'repo_name': 'bazitur/C6H6', 'size': '549'}