ds-ml-pipeline

Build scikit-learn pipelines with ColumnTransformer, GridSearchCV, and serialization.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/Phife726/ds_agent --skill ds-ml-pipeline
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ds-ml-pipeline
Source: https://github.com/Phife726/ds_agent/tree/main/ds-ml-pipeline
Command: npx skills add https://github.com/Phife726/ds_agent --skill ds-ml-pipeline

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you build end-to-end, reproducible machine learning pipelines that prevent data leakage and streamline production deployment.

Core Features & Use Cases

  • End-to-end pipeline construction: chain preprocessing and modeling into a single reusable object.
  • Leakage prevention: safeguards like ColumnTransformer prevent data leakage across train-test splits.
  • Hyperparameter tuning and deployment readiness: supports GridSearchCV and serialization for deployment.

Quick Start

Train a production-ready ML pipeline by combining a preprocessor with a classifier, fit on your training data, and serialize the trained pipeline for deployment.

Frequently Asked Questions about ds-ml-pipeline

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

FAQPage Schema
How do I prevent data leakage when building a machine learning pipeline?

Prevent data leakage in an ML pipeline by using a scikit-learn ColumnTransformer to encapsulate preprocessing steps, ensuring transformations fit only on training data and apply consistently across train-test splits.

How do I chain preprocessing and modeling steps for production-ready ML deployment?

Chain preprocessing and modeling steps for production-ready ML deployment by constructing a single scikit-learn Pipeline object with a final estimator, then serialize the fitted pipeline for deployment.

Does GridSearchCV work with a scikit-learn Pipeline for hyperparameter tuning?

Yes, GridSearchCV works with a scikit-learn Pipeline for hyperparameter tuning by accepting parameter grids prefixed with transformer names, enabling cross-validation across the entire workflow.

What is the best way to serialize a trained ML pipeline for deployment?

Serialize a trained ML pipeline for deployment by saving the complete fitted scikit-learn Pipeline object, which includes the preprocessor and final estimator, ensuring reproducible predictions in production.

Why does my preprocessing cause data leakage across train-test splits?

Preprocessing causes data leakage across train-test splits when transformations are fitted on the full dataset instead of training data only; using a scikit-learn Pipeline prevents this by isolating fitting logic.

Can I use a ColumnTransformer to handle mixed data types in an ML pipeline?

Yes, you can use a ColumnTransformer within an ML pipeline to handle mixed data types by applying distinct preprocessing steps to specific columns before passing data to the final estimator.