td-kmeans

Perform K-means clustering on Teradata Vantage tables using TD_KMeans.

7|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/teradata-labs/claude-cookbooks --skill td-kmeans
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: td-kmeans
Source: https://github.com/teradata-labs/claude-cookbooks/tree/main/skills/analytics/td-kmeans
Command: npx skills add https://github.com/teradata-labs/claude-cookbooks --skill td-kmeans

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and resources (resource) components.

What problem does it solve?

This Skill automates the process of customer segmentation and data grouping using K-Means clustering, enabling businesses to understand their customer base better and tailor strategies.

Core Features & Use Cases

  • Automated Data Analysis: Analyzes table structures, identifies features, and recommends preprocessing steps.
  • K-Means Clustering: Implements the TD_KMeans function for efficient clustering.
  • Model Deployment: Generates SQL for preprocessed data, model training, and prediction.
  • Use Case: A retail company wants to identify distinct customer groups for targeted marketing campaigns. This skill can analyze customer purchase history and demographics to create meaningful segments.

Quick Start

Analyze table: sales_data with target column: customer_id.

Frequently Asked Questions about td-kmeans

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform customer segmentation using K-Means clustering in Teradata?

Customer segmentation in Teradata uses the TD_KMeans function to group data based on table features. The process automates data preprocessing, SQL generation, and model evaluation to identify distinct customer groups for targeted strategies.

What is the best way to automate data preprocessing for K-Means clustering in SQL?

Automating data preprocessing for K-Means clustering involves analyzing table structures to identify features and recommend preprocessing steps. This generates the necessary SQL to prepare data for model training and prediction.

Does Teradata Vantage support K-Means clustering for large datasets?

Teradata Vantage supports K-Means clustering for large datasets through ClearScape Analytics. Users need database permissions and specific function access enabled to run TD_KMeans for efficient data grouping.

Can I generate SQL for model deployment when using K-Means clustering?

You can generate SQL for model deployment during K-Means clustering. This includes generating SQL scripts for preprocessed data, model training, and prediction to deploy the segmentation logic directly in the database.

What are the limitations of using TD_KMeans for data grouping?

Limitations of TD_KMeans include the strict requirement for ClearScape Analytics to be enabled on the Teradata Vantage platform. Users must also have specific database permissions and function access to execute the clustering and evaluation processes.

When do I need to use K-Means clustering for my retail data analysis?

You need K-Means clustering for retail data analysis when identifying distinct customer groups for targeted marketing campaigns. It analyzes purchase history and demographics to create meaningful segments for tailored business strategies.