td-train-test-split

Split Teradata Vantage tables into training and testing datasets with stratified sampling.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the process of splitting your Teradata data into training and testing sets, which is a crucial step for reliably evaluating machine learning models and preventing overfitting.

Core Features & Use Cases

  • Automated Data Splitting: Uses the TD_TrainTestSplit function to divide your dataset.
  • Stratified Sampling: Ensures that the distribution of your target variable is maintained in both the training and testing sets, which is vital for imbalanced datasets.
  • Reproducible Splits: Allows you to set a random seed for consistent results across multiple runs.
  • Use Case: Prepare your customer data for a churn prediction model by splitting it into 70% for training and 30% for testing, ensuring the model's performance is evaluated on unseen data.

Quick Start

Use the td-train-test-split skill to split my table named 'customer_data' with a target column 'churn_flag'.

Frequently Asked Questions about td-train-test-split

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

FAQPage Schema
How do I split a Teradata table for machine learning model validation?

Splitting a Teradata table for model validation involves partitioning your data into training and testing datasets using the TD_TrainTestSplit function, which prevents overfitting by ensuring your machine learning model is evaluated on unseen data.

Can I use stratified sampling for a train-test split on an imbalanced dataset?

Yes, you can use stratified sampling during a train-test split to maintain the target variable's distribution across both training and testing sets, which is vital for accurately evaluating models trained on imbalanced datasets.

How do I ensure reproducible results when partitioning data in Teradata?

To ensure reproducible data partitioning results in Teradata, set a random seed parameter when executing the TD_TrainTestSplit function, guaranteeing consistent dataset splits across multiple runs for reliable machine learning validation.

Does TD_TrainTestSplit support custom ratios like 70% training and 30% testing?

Yes, the TD_TrainTestSplit function supports custom ratios like 70% training and 30% testing, allowing you to specify the exact partition sizes needed to prepare your customer data for churn prediction models.

Why do I need to split my data before training a churn prediction model?

Splitting data before training a churn prediction model is necessary to prevent overfitting and ensure reliable performance evaluation, allowing you to accurately validate the model's predictions against a dedicated testing dataset.