<jupyter_start><jupyter_text>HW06Name:<NAME>  GTid:903461609<jupyter_code>from sklearn.cluster import KMeans, MeanShift
from sklearn.cluster import AgglomerativeClustering
import matplotlib.pyplot as plt
import pandas as pd
%matplotlib inline
import numpy as np

X=np.array([[1,0],
    [2,0],
    [8,0],
    [9,0],
    [31,0],
    [32,0],
    [38,0],
    [39,0],])


cluster = AgglomerativeClustering(n_clusters=4, affinity='euclidean', linkage='ward')
cluster.fit_predict(X)
print(cluster.labels_)

plt.scatter(X[:,0],X[:,1], c=cluster.labels_, cmap='rainbow')



def distance()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15763546798029557, 'fraction_numerical': 0.05582922824302135, 'mean_word_length': 5.931818181818182, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '494022', 'license': 'MIT', 'n_tokens_mistral': 264, 'n_tokens_neox': 242, 'n_words': 43, 'path': 'HW06.ipynb', 'repo_name': 'Berlyli866/machine-learning-', 'size': '611'}