Spaces:
Sleeping
Sleeping
update user guide font size
Browse files- closest_sample.py +2 -1
closest_sample.py
CHANGED
@@ -39,7 +39,8 @@ def pca_distance(pca,sample,embedding,top_k):
|
|
39 |
distances = np.linalg.norm(all - s, axis=1)
|
40 |
sorted_indices = np.argsort(distances)
|
41 |
filtered_indices = sorted_indices[sorted_indices<=2852]
|
42 |
-
|
|
|
43 |
|
44 |
def return_paths(argsorted,files):
|
45 |
paths= []
|
|
|
39 |
distances = np.linalg.norm(all - s, axis=1)
|
40 |
sorted_indices = np.argsort(distances)
|
41 |
filtered_indices = sorted_indices[sorted_indices<=2852]
|
42 |
+
top_indices = np.concatenate([filtered_indices[:2], filtered_indices[3:top_k+1]])
|
43 |
+
return top_indices
|
44 |
|
45 |
def return_paths(argsorted,files):
|
46 |
paths= []
|