(
embeddings: np.ndarray, dim: int, num_neighbors: int = 10, metric: str = "cosine"
)
| 191 | |
| 192 | |
| 193 | def local_cluster_embeddings( |
| 194 | embeddings: np.ndarray, dim: int, num_neighbors: int = 10, metric: str = "cosine" |
| 195 | ) -> np.ndarray: |
| 196 | reduced_embeddings = umap.UMAP( |
| 197 | n_neighbors=num_neighbors, n_components=dim, metric=metric |
| 198 | ).fit_transform(embeddings) |
| 199 | return reduced_embeddings |
| 200 | |
| 201 | |
| 202 | def fit_gaussian_mixture(n_components, embeddings, random_state): |
nothing calls this directly
no outgoing calls
no test coverage detected