Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created December 27, 2023 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantra-go-algo/1c8fe8cb77a83bb5b06f0eea82b97a76 to your computer and use it in GitHub Desktop.
Save quantra-go-algo/1c8fe8cb77a83bb5b06f0eea82b97a76 to your computer and use it in GitHub Desktop.
from sklearn.cluster import AgglomerativeClustering
cluster = AgglomerativeClustering(
n_clusters=3, affinity='euclidean', linkage='ward')
cluster.fit(iris_X)
labels = cluster.labels_
labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment