List furthest from centroids

Open In ColabOpen In Colab

To determine whether your clustering algorithm is successful, it is helpful to view documents furthest from the centroid to see the boundary of what is considered to be in the same cluster.

What you will need

You will need to have followed the quickstart clustering guide.

Code Example

Open In ColabOpen In Colab

DATASET_ID = "quickstart_clustering"
VECTOR_FIELD = "product_name_default_vector_"

client.services.cluster.centroids.list_furthest_from_center(
  dataset_id = DATASET_ID, 
  vector_field = VECTOR_FIELD, 
  cluster_ids = [], 
  alias = "default"
)

Did this page help you?