Spaces:
Runtime error
Runtime error
Update clustering.py
Browse files- clustering.py +5 -4
clustering.py
CHANGED
|
@@ -598,11 +598,12 @@ def create_3d_umap_plot(data):
|
|
| 598 |
fig.show()
|
| 599 |
|
| 600 |
|
| 601 |
-
def perform_clustering(data, min_eps, max_eps=0.95, n=5, embeddings_col="embeddings"):
|
| 602 |
|
| 603 |
-
|
| 604 |
-
|
| 605 |
-
|
|
|
|
| 606 |
|
| 607 |
cluster_assignments = {}
|
| 608 |
cluster_counts = {}
|
|
|
|
| 598 |
fig.show()
|
| 599 |
|
| 600 |
|
| 601 |
+
def perform_clustering(data, min_eps, max_eps=0.95, n=5, threshold_values=None, embeddings_col="embeddings"):
|
| 602 |
|
| 603 |
+
if not threshold_values:
|
| 604 |
+
embeddings_matrix = np.array(data[embeddings_col].tolist())
|
| 605 |
+
# threshold_values = np.round(np.linspace(min_eps, max_eps, n), 2)
|
| 606 |
+
threshold_values = np.linspace(min_eps, max_eps, n)
|
| 607 |
|
| 608 |
cluster_assignments = {}
|
| 609 |
cluster_counts = {}
|