Clusters the given list of vectors using the k-means or hierarchical algorithm.
(method=KMEANS, vectors=[], **kwargs)
| 1446 | return d |
| 1447 | |
| 1448 | def cluster(method=KMEANS, vectors=[], **kwargs): |
| 1449 | """ Clusters the given list of vectors using the k-means or hierarchical algorithm. |
| 1450 | """ |
| 1451 | if method == KMEANS: |
| 1452 | return k_means(vectors, **kwargs) |
| 1453 | if method == HIERARCHICAL: |
| 1454 | return hierarchical(vectors, **kwargs) |
| 1455 | |
| 1456 | #--- K-MEANS --------------------------------------------------------------------------------------- |
| 1457 | # k-means is fast but no optimal solution is guaranteed (random initialization). |
nothing calls this directly
no test coverage detected
searching dependent graphs…