Learn Before
Code
Python Code for Agglomerative Clustering
# imports from sklearn.cluster import AgglomerativeClustering import numpy as np #create 100 samples with 10 features X = np.random.rand(100,10) # create model, then fit the data to the model, then generate clustering predictions clustering = AgglomerativeClustering().fit_predict(X) # show cluster labels for each sample clustering
0
1
Updated 2020-03-10
Tags
Data Science