scikit-learn

Build scikit-learn pipelines for classification, regression, clustering, and dimensionality reduction.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill scikit-learn-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scikit-learn
Source: https://github.com/shushuzn/Rairos/tree/main/skills/scikit-learn
Command: npx skills add https://github.com/shushuzn/Rairos --skill scikit-learn-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you build, evaluate, and tune classical machine learning models without getting stuck on the right API choices or workflow structure.

Core Features & Use Cases

  • Supervised learning: Train models for classification and regression, then evaluate using the right metrics and cross-validation.
  • Unsupervised learning: Cluster data and reduce dimensionality to discover patterns and structure.
  • Preprocessing + pipelines: Safely handle missing values, scaling, encoding, and model composition to prevent data leakage.
  • Model selection: Use cross-validation and hyperparameter search to improve generalization.

Quick Start

Use scikit-learn to train a supervised classification pipeline on mixed numeric and categorical features by running the provided script example with python scripts/classification_pipeline.py.

Frequently Asked Questions about scikit-learn

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

FAQPage Schema
How do I build a machine learning pipeline that handles preprocessing and prevents data leakage?

To build a machine learning pipeline that prevents data leakage, you should sequentially chain preprocessing steps like scaling and encoding with your model using scikit-learn's Pipeline API, ensuring all data transformations are fitted only on training folds during cross-validation.

What's the best way to tune hyperparameters and evaluate model generalization in scikit-learn?

The best way to tune hyperparameters and evaluate generalization in scikit-learn is to combine cross-validation with a hyperparameter search technique, systematically testing parameter combinations to identify the model configuration that performs most reliably on unseen data.

Can I perform both supervised classification and unsupervised clustering tasks using this approach?

Yes, you can perform both supervised classification and unsupervised clustering tasks using scikit-learn, which provides APIs to train predictive models on labeled data and discover structural patterns or groupings in unlabeled data.

Do I need pandas and numpy installed to train models for classification and regression?

Yes, you need pandas and numpy installed to train classification and regression models, as they provide the foundational numerical array structures and tabular data manipulations required by scikit-learn to process input features and targets.

How does cross-validation help with model selection for machine learning workflows?

Cross-validation helps with model selection by repeatedly partitioning the dataset into training and validation subsets, providing a robust estimate of model performance to ensure chosen algorithms generalize well rather than simply memorizing training data.

When should I use dimensionality reduction in an unsupervised learning workflow?

You should use dimensionality reduction in an unsupervised learning workflow when you need to compress high-dimensional feature spaces into fewer components, helping to visualize cluster structures and reduce computational noise before applying clustering algorithms.