import os
from woodwide import WoodWide
client = WoodWide(
api_key=os.environ.get("WOOD_WIDE_AI_API_KEY"), # This is the default and can be omitted
)
response = client.api.models.clustering.infer(
model_id="model_id",
)
print(response.cluster_label)
Assigns cluster labels to rows in the provided dataset using a trained clustering model. Returns a mapping of row IDs to cluster indices and descriptions.
POST
/
api
/
models
/
clustering
/
{model_id}
/
infer
Python
Copy
Ask AI
import os
from woodwide import WoodWide
client = WoodWide(
api_key=os.environ.get("WOOD_WIDE_AI_API_KEY"), # This is the default and can be omitted
)
response = client.api.models.clustering.infer(
model_id="model_id",
)
print(response.cluster_label)
Response for clustering models.
Contains 'cluster_label' mapping row IDs to cluster indices.
May contain 'cluster_descriptions' mapping cluster indices to text descriptions.