<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>
StarcoderdataJupyterStructuredCleanDedup