skillfed

scikit-learn

scikit-learn is Python's go-to library for classical machine learning across classification, regression, clustering, and dimensionality reduction. It includes algorithms ranging from linear models and decision trees to ensemble methods and support vector machines, plus comprehensive tools for preprocessing, model evaluation, and hyperparameter tuning. Use it to build production-ready ML pipelines with built-in cross-validation and feature engineering capabilities.

scikit-learn helps you build and train supervised learning models for classification and regression tasks in Python.

AI-generated summary based on this skill's SKILL.md

2,896 403 Apache-2.0 updated by synthetic-sciences

Install

synthetic-sciences/openscience/scikit-learn · repository language: TypeScript

git clone https://github.com/synthetic-sciences/openscience
cp -r openscience/backend/cli/skills/coding/scikit-learn ~/.claude/skills/scikit-learn
npx skillfed install synthetic-sciences/openscience/scikit-learn

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is scikit-learn used for in machine learning?

scikit-learn is Python's go-to library for classical machine learning across classification, regression, clustering, and dimensionality reduction. It includes algorithms ranging from linear models and decision trees to ensemble methods and support vector machines, plus comprehensive tools for preprocessing, model evaluation, and hyperparameter tuning.

How do I build a machine learning pipeline in Python with scikit-learn?

scikit-learn enables you to create production-ready ML pipelines using Pipeline and ColumnTransformer to handle mixed data types. Combine preprocessing steps (scaling, encoding) with model estimators in a single workflow, ensuring consistent transformations during training and prediction while avoiding data leakage.

How does scikit-learn hyperparameter tuning with grid search work?

scikit-learn's GridSearchCV exhaustively searches over specified hyperparameter combinations, evaluating each with cross-validation. It automates the tuning process, tracks performance metrics, and returns the best parameters and model. Pair it with RandomizedSearchCV for faster exploration of larger parameter spaces.

What clustering algorithms does scikit-learn provide?

scikit-learn offers multiple clustering approaches: k-means for centroid-based partitioning, DBSCAN for density-based clustering that finds arbitrary shapes, hierarchical clustering for dendrograms, and Gaussian Mixture Models for probabilistic clustering. Choose based on your data structure and whether you need to specify cluster count upfront.

How do I preprocess and handle missing values in scikit-learn?

scikit-learn provides SimpleImputer for filling missing values (mean, median, most frequent), StandardScaler and MinMaxScaler for feature scaling, OneHotEncoder for categorical encoding, and RFE for feature selection. Combine these in a Pipeline to ensure reproducible, leak-free preprocessing workflows.

What model evaluation and cross-validation tools does scikit-learn offer?

scikit-learn includes cross_val_score for k-fold cross-validation, cross_validate for multiple metrics, and specialized scorers for classification (precision, recall, F1) and regression (R², MSE). Use these to assess generalization, detect overfitting, and compare models fairly before hyperparameter tuning.

SKILL.md

rendered from the published skill — quoted content, verbatim

Scikit-learn

Overview

This skill provides comprehensive guidance for machine learning tasks using scikit-learn, the industry-standard Python library for classical machine learning. Use this skill for classification, regression, clustering, dimensionality reduction, preprocessing, model evaluation, and building production-ready ML pipelines.

Installation

```bash

Install scikit-learn using uv

uv uv pip install scikit-learn

Optional: Install visualization dependencies

uv uv pip install matplotlib seaborn

Commonly

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 9 files
backend/cli/skills/coding/scikit-learn/SKILL.md
backend/cli/skills/coding/scikit-learn/references/model_evaluation.md
backend/cli/skills/coding/scikit-learn/references/pipelines_and_composition.md
backend/cli/skills/coding/scikit-learn/references/preprocessing.md
backend/cli/skills/coding/scikit-learn/references/quick_reference.md
backend/cli/skills/coding/scikit-learn/references/supervised_learning.md
backend/cli/skills/coding/scikit-learn/references/unsupervised_learning.md
backend/cli/skills/coding/scikit-learn/scripts/classification_pipeline.py
backend/cli/skills/coding/scikit-learn/scripts/clustering_analysis.py

Related skills

Tags

supervised-learning unsupervised-learning model-tuning data-transformation ensemble-methods feature-engineering cross-validation algorithm-selection production-workflows classical-ml