scikit-learn

Guide building, evaluating, and deploying classical ML models with scikit-learn.

33.0k|3.2k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill scikit-learn-k-dense-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-learn
Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/scikit-learn
Command: npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill scikit-learn-k-dense-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scikit-learn, matplotlib, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This guide provides comprehensive guidance for building, evaluating, and optimizing classical machine learning models using scikit-learn, covering workflows from data preprocessing to model deployment.

Core Features & Use Cases

  • Comprehensive support for supervised learning (classification, regression) and unsupervised learning (clustering, dimensionality reduction), evaluation metrics, and model selection.
  • End-to-end pipelines and preprocessing patterns (ColumnTransformer, Pipeline) to create robust, production-ready workflows.
  • Rich references and practical examples across common tasks, including demo scripts and quick-start templates to accelerate learning.

Quick Start

Run the included breast cancer classification example to train, evaluate, and compare models using scikit-learn.

Frequently Asked Questions about scikit-learn

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

FAQPage Schema
How do I build end-to-end machine learning pipelines with scikit-learn for tabular data?

To build machine learning pipelines with scikit-learn, use Pipeline and ColumnTransformer to sequentially apply preprocessing steps and estimator models, creating a unified, production-ready workflow for tabular data.

What's the best way to evaluate classification model performance in scikit-learn?

Evaluating classification model performance in scikit-learn requires using cross-validation techniques and metrics modules to validate predictive accuracy and compare different models before deployment.

Can I use scikit-learn for both supervised classification and unsupervised clustering tasks?

Yes, scikit-learn supports both supervised learning like classification and regression, alongside unsupervised learning including clustering and dimensionality reduction across your tabular datasets.

How does a ColumnTransformer work when preprocessing mixed tabular data types?

A ColumnTransformer works by applying different preprocessing transformations to specific columns of a tabular dataset, routing categorical and numerical features to their respective encoders or scalers within a single pipeline.

Do I need pandas and numpy installed to run scikit-learn preprocessing scripts?

Yes, you need pandas and numpy installed because scikit-learn preprocessing scripts and pipelines rely on these libraries to structurally handle and manipulate tabular data arrays before model training.

Why use scikit-learn pipelines instead of applying preprocessing and model training separately?

Using scikit-learn pipelines instead of separate preprocessing steps prevents data leakage during cross-validation, bundles transformations with estimators, and streamlines model deployment into a single reproducible workflow.