Cluster Analysis in Python
Shaumik Daityari
Business Analyst
timeit.linkage() messenfrom scipy.cluster.hierarchy import linkage import pandas as pd import random, timeitpoints = 100 df = pd.DataFrame({'x': random.sample(range(0, points), points), 'y': random.sample(range(0, points), points)})%timeit linkage(df[['x', 'y']], method = 'ward', metric = 'euclidean')
1.02 ms ± 133 µs pro Schleife (Mittelwert ± Stdabw. von 7 Läufen, je 1000 Schleifen)

Cluster Analysis in Python