# scikit-learn

> Canonical: https://skillalmanac.com/glossary/scikit-learn | Last verified: 2026-11-24 | Index status: not offered to search engines

scikit-learn is an open source Python library for machine learning, described by its own site as simple and efficient tools for predictive data analysis. It covers classification, regression, clustering, dimensionality reduction, model selection and preprocessing.

Also called: sklearn, scikit learn, scikit machine learning, scikit-learn library, scikit-learn python.

## In plain language

scikit-learn is a free Python toolkit for the classic jobs in machine learning, which means teaching a program to find patterns in a table of examples. Typical jobs are sorting items into categories (such as spam or not spam), predicting a number, or grouping similar customers. Think of it as a well-stocked drawer of standard tools, each with the same handle. It is built for this kind of predictive work and is not a chat model or an image generator. A model that scores well on the data it learned from can still fail on new data. Check that with held-out examples before you trust it.

## Technical definition

scikit-learn is built on NumPy, SciPy and matplotlib and released under a BSD license, according to its documentation. Its site groups the library into classification, regression, clustering, dimensionality reduction, model selection and preprocessing. The model selection area covers comparing, validating and choosing parameters and models, with tools such as grid search, cross validation and metrics. The 2011 Journal of Machine Learning Research paper by Pedregosa and colleagues describes it as a Python module integrating a wide range of state-of-the-art machine learning algorithms for medium-scale supervised and unsupervised problems, and stresses ease of use, documentation and API consistency.

## How it shows up when you use agents

scikit-learn shows up when you ask a coding agent such as Claude Code or Codex to analyse a table: predict a column, group rows, or compare several models. The agent writes Python that imports the library, fits a model on one part of the data and checks it on another. The documentation lists model selection tools such as cross validation for that check.

What breaks when it is misunderstood: people read a single score from the agent's run as proof the model works. A model can look good on the rows it learned from and fail on new ones, which is [overfitting](/glossary/overfitting). People also reach for scikit-learn when the task is language or images; the library's own site lists classification, regression, clustering, dimensionality reduction, model selection and preprocessing as its areas.

Next action: ask the agent which rows it held out for testing and how it chose them, and profile the data first with the [data analysis EDA skill](/skills/skill-almanac/data-analysis-eda). For [supervised learning](/glossary/supervised-learning) you need labelled examples. For [unsupervised learning](/glossary/unsupervised-learning), such as clustering, you do not, but you must judge the groups yourself.

## Common confusions

- **scikit-learn versus TensorFlow.** They are separate libraries with separate documentation. Read each project's own site to see what it covers.
- **A library versus a model.** scikit-learn supplies algorithms. A model is what you get after fitting one to your data.
- **scikit-learn versus sklearn.** The package is imported under the short name sklearn, and both names refer to the same project.
- **Myth: a high score means it will work.** A score on data the model has already seen says little about new data. Test on held-out rows.

## Worked examples in this catalogue

### [data-analysis-eda](https://skillalmanac.com/skills/skill-almanac/data-analysis-eda)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A fixed exploratory-analysis procedure and a CSV profiler that keeps findings descriptive, evidenced and caveated.

Why it exercises the concept: Fitting a model starts with knowing the columns and their problems. This skill is the descriptive pass over a CSV and does not fit any model.

### [csv-structure-validator](https://skillalmanac.com/skills/skill-almanac/csv-structure-validator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A check of a CSV file for ragged rows, blank or duplicate headers, and per-column rule failures such as bad ISO dates, duplicate IDs and out-of-range numbers.

Why it exercises the concept: Faults like ragged rows or duplicate IDs are worth catching in a table before a model is fitted to it. The skill reports them.

### [csv-version-diff](https://skillalmanac.com/skills/skill-almanac/csv-version-diff)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A comparison of two versions of a CSV by key that lists added, removed and changed rows, cell by cell.

Why it exercises the concept: When a refitted model behaves differently, a first question is whether its input file changed. This skill shows what changed between two versions.

## Related terms

- [Machine learning (ML)](https://skillalmanac.com/glossary/machine-learning.md)
- [Supervised learning](https://skillalmanac.com/glossary/supervised-learning.md)
- [Unsupervised learning](https://skillalmanac.com/glossary/unsupervised-learning.md)
- [TensorFlow](https://skillalmanac.com/glossary/tensorflow.md)
- [Machine learning algorithm](https://skillalmanac.com/glossary/machine-learning-algorithm.md)

## Sources

- [scikit-learn: Machine Learning in Python](https://scikit-learn.org/stable/index.html), scikit-learn project (accessed 2026-11-24)
- [Scikit-learn: Machine Learning in Python](https://jmlr.org/papers/v12/pedregosa11a.html), Journal of Machine Learning Research (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-24. [Glossary index](https://skillalmanac.com/glossary.md).
