scikit-learn

This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production.

scikit-learn is the general-purpose machine-learning library of the scientific Python ecosystem. It offers a uniform interface for classification, regression, clustering, dimensionality reduction, preprocessing, model selection and evaluation, built on NumPy, SciPy and joblib. This sub-section belongs to the Data Science section and explains the library page by page, from installation and the estimator API to pipelines, validation, inspection and deployment concerns such as model persistence. This is the general library tour; the models and practices specific to machine learning (neural-network wrappers, Gaussian processes, imbalanced data, out-of-core learning) are in the ML scikit-learn sub-section. For a one-page summary of the most used calls, see the scikit-learn part of the cheat sheet.

Version baseline

Item Value checked in October 2026

scikit-learn

1.9 (the pages were run against 1.9.1). The development series is 1.10 and is labelled "upcoming" wherever it is mentioned.

Python

Examples target Python 3.13 or 3.14 and were run on Python 3.13. scikit-learn 1.9 itself needs Python 3.11 or later.

Related libraries

NumPy 2.5 and pandas 3.1, used in the examples where a page needs them.

The changes between 1.6 and 1.9 that matter when reading older tutorials are collected on What’s New in scikit-learn 1.6 to 1.9.

What the names mean

The same project appears under three spellings, and each one refers to something different.

Name Meaning

scikit-learn

The project and its distribution (package) name. It is what you install: pip install scikit-learn. The FAQ gives this as the correct spelling, not "scikit", "SciKit" or "sci-kit learn".

scikit

A short form of "SciPy toolkit". There are several scikits, which are scientific toolboxes built around SciPy. Besides scikit-learn, a popular one is scikit-image. Earlier versions of the project were called scikits.learn and scikits-learn, names that are no longer used.

sklearn

The import name of the Python package: import sklearn, or from sklearn.linear_model import LogisticRegression. The distribution name and the import name differ, so a package called sklearn on PyPI is not the library.

The FAQ pronounces the name "sy-kit learn", where "sci" stands for science. The installation steps, including the difference between the distribution name and the import name, are on Installing scikit-learn.

Source: scikit-learn FAQ.

Concept-to-page map

The map groups every page of the sub-section by the question it answers.

Start here

Page Covers

Installing scikit-learn

Installing with pip, conda or uv and checking the environment.

Getting Started with scikit-learn

A first end-to-end workflow: fit, predict, preprocess, pipeline and evaluate.

What’s New in scikit-learn 1.6 to 1.9

Releases, deprecations and removals relevant to current code.

Glossary of Key Terms in scikit-learn

The vocabulary used in the documentation and in these pages.

Choosing the Right Estimator in scikit-learn

Which family of models fits which kind of problem.

The estimator API

Page Covers

The scikit-learn Estimator API

Estimators, predictors, transformers and the conventions that tie them together.

get_params, set_params and clone

Reading and changing hyperparameters, and copying unfitted estimators.

pandas & polars Output (set_output)

Returning DataFrames from transformers.

Metadata Routing

Passing sample weights and groups through meta-estimators.

FrozenEstimator

Keeping a fitted estimator fixed inside other tools.

Data and preprocessing

Page Covers

Dataset Loaders, Fetchers and Generators in scikit-learn

Bundled datasets, downloads and synthetic data.

Train/Test Split

Holding out data, stratification and shuffling.

Scaling & Transforming Features

Standardisation, normalisation and non-linear transforms.

Encoding Categorical Features

One-hot, ordinal and target encoding.

Imputing Missing Values

Simple, iterative and nearest-neighbour imputation.

Feature Extraction: Text, Dicts & Hashing

Turning text and dictionaries into numeric features.

Feature Selection

Filter, wrapper and model-based selection.

ColumnTransformer & Heterogeneous Data

Different preprocessing for different columns.

Pipelines

Chaining steps so training and prediction share one workflow.

Supervised learning

Page Covers

Linear Models and Logistic Regression in scikit-learn

Least squares, regularisation and logistic regression.

Support Vector Machines in scikit-learn

Kernels, margins and the SVC and SVR families.

Nearest Neighbors

Neighbour-based classification, regression and search.

Naive Bayes

Probabilistic classifiers for counts, continuous and binary features.

Decision Trees

Tree growth, criteria and pruning.

Random Forests & Bagging

Averaging ensembles.

Gradient Boosting & HistGradientBoosting

Boosted tree ensembles.

Voting, Stacking & Multiclass

Combining models and handling more than two classes.

Unsupervised learning

Page Covers

Clustering

K-means, hierarchical, density-based and other clustering.

Gaussian Mixture Models

Soft clustering and density estimation.

PCA, TruncatedSVD & NMF

Linear dimensionality reduction.

Manifold Learning

Non-linear embeddings.

Outlier & Novelty Detection

Finding unusual observations.

Evaluation and model selection

Page Covers

Metrics & Scoring

Classification, regression and clustering metrics and scorers.

Cross-Validation & Splitters in scikit-learn

Resampling schemes and splitters.

Validation & Learning Curves in scikit-learn

Diagnosing bias and variance.

Grid, Randomized & Halving Search in scikit-learn

Searching hyperparameters.

Probability Calibration

Making predicted probabilities reliable.

Tuning the Decision Threshold in scikit-learn

Choosing the cut-off for a classifier.

Common Pitfalls: Leakage and Randomness

Data leakage and reproducibility.

Inspection, performance and deployment

Page Covers

Permutation Importance & Partial Dependence

Explaining what a fitted model uses.

Display Objects and Visualizations in scikit-learn

Plotting through the Display classes.

Performance and Parallelism in scikit-learn

Threads, processes and speed.

Array API and GPU Support (Experimental)

Running on other array libraries and GPUs.

Model Persistence and Security in scikit-learn

Saving and loading models safely.

Where scikit-learn sits in the stack

scikit-learn works on in-memory arrays and DataFrames and does not train deep neural networks. Arrays come from NumPy, tabular data usually from pandas, and plotting from Matplotlib. For the surrounding workflow see Data Science, and for libraries that complement it see the pages linked from there.

Bibliography

All official links were opened on 2026-10-30.

Books

Books are linked to the publisher’s page. Some editions predate the current API, so use them for concepts and the official documentation for calls.

Links opened on 2026-10-30.