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: |
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 |
sklearn |
The import name of the Python package: |
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 with pip, conda or uv and checking the environment. |
|
A first end-to-end workflow: fit, predict, preprocess, pipeline and evaluate. |
|
Releases, deprecations and removals relevant to current code. |
|
The vocabulary used in the documentation and in these pages. |
|
Which family of models fits which kind of problem. |
The estimator API
| Page | Covers |
|---|---|
Estimators, predictors, transformers and the conventions that tie them together. |
|
Reading and changing hyperparameters, and copying unfitted estimators. |
|
Returning DataFrames from transformers. |
|
Passing sample weights and groups through meta-estimators. |
|
Keeping a fitted estimator fixed inside other tools. |
Data and preprocessing
| Page | Covers |
|---|---|
Bundled datasets, downloads and synthetic data. |
|
Holding out data, stratification and shuffling. |
|
Standardisation, normalisation and non-linear transforms. |
|
One-hot, ordinal and target encoding. |
|
Simple, iterative and nearest-neighbour imputation. |
|
Turning text and dictionaries into numeric features. |
|
Filter, wrapper and model-based selection. |
|
Different preprocessing for different columns. |
|
Chaining steps so training and prediction share one workflow. |
Supervised learning
| Page | Covers |
|---|---|
Least squares, regularisation and logistic regression. |
|
Kernels, margins and the SVC and SVR families. |
|
Neighbour-based classification, regression and search. |
|
Probabilistic classifiers for counts, continuous and binary features. |
|
Tree growth, criteria and pruning. |
|
Averaging ensembles. |
|
Boosted tree ensembles. |
|
Combining models and handling more than two classes. |
Unsupervised learning
| Page | Covers |
|---|---|
K-means, hierarchical, density-based and other clustering. |
|
Soft clustering and density estimation. |
|
Linear dimensionality reduction. |
|
Non-linear embeddings. |
|
Finding unusual observations. |
Evaluation and model selection
| Page | Covers |
|---|---|
Classification, regression and clustering metrics and scorers. |
|
Resampling schemes and splitters. |
|
Diagnosing bias and variance. |
|
Searching hyperparameters. |
|
Making predicted probabilities reliable. |
|
Choosing the cut-off for a classifier. |
|
Data leakage and reproducibility. |
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.
Related material on this site
In the ML (Machine Learning) section: scikit-learn, Classic ML Algorithms at a Glance and From scikit-learn to Deep Learning.
Bibliography
All official links were opened on 2026-10-30.
scikit-learn sources
-
What’s new (0.18 to 1.9, development 1.10)
-
scikit-learn enhancement proposals (SLEP006, 009, 017, 018 and 023)
Ecosystem and general sources
-
Matplotlib and seaborn
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.
-
Aurélien Géron, Hands-On Machine Learning with Scikit-Learn and TensorFlow, O’Reilly, 2017: https://www.oreilly.com/library/view/hands-on-machine-learning/9781491962282/
-
Aurélien Géron, Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 2nd ed., O’Reilly, 2019: https://www.oreilly.com/library/view/hands-on-machine-learning/9781492032632/
-
Aurélien Géron, Hands-On Machine Learning with Scikit-Learn and PyTorch, O’Reilly, 2025: https://www.oreilly.com/library/view/-/9798341607972/
-
Stephen Marsland, Machine Learning: An Algorithmic Perspective, 2nd ed., CRC Press, 2015: https://www.routledge.com/Machine-Learning-An-Algorithmic-Perspective-Second-Edition/Marsland/p/book/9781466583283
-
Wes McKinney, Python for Data Analysis, 2nd ed., O’Reilly, 2017: https://www.oreilly.com/library/view/python-for-data/9781491957653/ (3rd edition, open access: https://wesmckinney.com/book/)
-
Laura Igual and Santi Seguí, Introduction to Data Science, Springer, 2017: https://link.springer.com/book/10.1007/978-3-319-50017-1
-
Steven S. Skiena, The Data Science Design Manual, Springer, 2017: https://link.springer.com/book/10.1007/978-3-319-55444-0
-
John Hunt, Advanced Guide to Python 3 Programming, Springer, 2019: https://link.springer.com/book/10.1007/978-3-030-25943-3
-
Laurence Moroney, AI and ML for Coders in PyTorch, O’Reilly, 2025: https://www.oreilly.com/library/view/-/9781098199166/
-
Sandro Skansi, Introduction to Deep Learning, Springer, 2018: https://link.springer.com/book/10.1007/978-3-319-73004-2
-
LazyProgrammer, Deep Learning in Python, self-published, 2016: https://lazyprogrammer.me/
-
Open references: An Introduction to Statistical Learning with Python (ISLP) and The Elements of Statistical Learning
Links opened on 2026-10-30.