Agent skill
Teradata SMOTE Oversampling
Synthetic Minority Oversampling for imbalanced datasets
Install this agent skill to your Project
npx add-skill https://github.com/teradata-labs/claude-cookbooks/tree/main/skills/analytics/td-smote
SKILL.md
Teradata SMOTE Oversampling
| Property | Value |
|---|---|
| Skill Name | Teradata SMOTE Oversampling |
| Description | Synthetic Minority Oversampling for imbalanced datasets |
| Category | Feature Engineering |
| Primary Function | TD_SMOTE |
| Framework | SQLE |
| - Minimum Version: Teradata 20.00 |
Core Capabilities
- Automated table structure analysis via DBC.ColumnsV
- Dynamic SQL generation for TD_SMOTE
- Complete workflow from data preparation to results interpretation
- Data quality validation and preprocessing guidance
- Parameter optimization and tuning
Key Parameters
- InputColumns: Feature columns
- TargetColumn: Target/class column (identifies minority class)
- SamplingStrategy: 'smote' (standard), 'adasyn' (adaptive), 'borderline'
- NearestNeighbors: K for neighborhood (default 5)
- SamplingPercentage: Oversampling ratio percentage
- Seed: Random seed
- Accumulate: Columns to pass through
Use Cases
- Handling class imbalance in classification
- Fraud detection data augmentation
- Rare event prediction improvement
- Medical diagnosis with minority classes
Example Usage
-- TD_SMOTE execution
SELECT * FROM TD_SMOTE (
ON {USER_DATABASE}.{USER_TABLE} AS InputTable
USING
InputColumns ('{FEATURE_COLUMNS}')
TargetColumn ('{TARGET_COLUMN}')
SamplingStrategy ('smote') -- 'smote','adasyn','borderline'
NearestNeighbors (5)
SamplingPercentage (100)
Seed (42)
Accumulate ('{ID_COLUMN}')
) AS dt;
Scripts Included
Core Analytics Scripts
table_analysis.sql: Automatic table structure discoverypreprocessing.sql: Data preparation and feature engineeringmodel_training.sql: TD_SMOTE executionevaluation.sql: Results analysis and metricscomplete_workflow_template.sql: End-to-end workflow
Utility Scripts
data_quality_checks.sql: Comprehensive data validationparameter_tuning.sql: Parameter optimizationdiagnostic_queries.sql: Results diagnostics and interpretation
Best Practices
- Always run table_analysis.sql first to understand your data structure
- Validate data quality before executing the analytical function
- Use parameter_tuning.sql to find optimal configuration
- Review diagnostic_queries.sql output for model/results validation
Limitations
- Requires Teradata Vantage 20.00+ with ClearScape Analytics
- Input data must meet function-specific requirements
- Results depend on data quality and parameter configuration
Teradata SMOTE Oversampling - ClearScape Analytics skill for Teradata Vantage
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tune-workloads
Analyze workload classification and **autonomously configure** classification rules, filters, and priorities to improve accuracy and meet business requirements
optimize-throttles
Analyze throttle behavior, recommend optimal configurations, and autonomously create/modify throttles to balance resource allocation and meet performance SLAs
analyze-performance
Analyze system performance using throttle statistics, query logs, and resource metrics to identify bottlenecks and optimization opportunities
monitor-workloads
Monitor workload definitions, distribution, and TASM statistics using real-time resources to understand classification effectiveness and workload performance
monitor-resources
Monitor AMP processor load, system physical resources, and capacity using real-time resources to track system health and identify performance bottlenecks
monitor-sessions
Monitor active Teradata sessions using real-time resources, view SQL execution details, identify blocking issues, and optionally take control actions
Didn't find tool you were looking for?