Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

scikit-learn

Python machine learning library with classification, regression and clustering algorithms.

ML and data sciencePYPI

GitHubWebsite

1. License

License from PyPI license expression.

github.com/scikit-learn/scikit-learn

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What scikit-learn does

scikit-learn keeps a deliberately narrow scope: one unified API for the basic machine learning tasks, tied together with pipelines and grid search, while deep learning, reinforcement learning and structured prediction are kept out by design.

scikit-learn popularity

86 / 100
Gid Score, #36 overall
54.3M
downloads a week, pypi
68.3K
GitHub stars
135
agent projects use it
scikit-learn: downloads per weekPyPI, scikit-learn 53,618,307
scikit-learn: GitHub starsscikit-learn/scikit-learn 68,304

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How scikit-learn is used

  • scikit-learn is a dependency in 135 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (8.3% of the 1,623 Python ones), #3 of 293 in ml and data science.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,348; those are left out of every share on this page.
  • Projects that use it most often also use NumPy (86.7%), pandas (76.3%), Matplotlib (51.1%).
  • It is more common in projects set up for OpenClaw (4.8%) than for Gemini CLI (1.1%).

By coding agent

73 projects, 2.2%
70 projects, 2.3%
51 projects, 2.1%
16 projects, 4.8%
9 projects, 3.2%
7 projects, 1.5%
5 projects, 1.1%

Often used with

In 86.7% of its projects
In 76.3% of its projects
In 51.1% of its projects
In 49.6% of its projects
In 49.6% of its projects
In 48.1% of its projects
In 46.7% of its projects
In 46.7% of its projects

scikit-learn in practice

Strengths

ColumnTransformer handles mixed-type frames

The FAQ describes <code>ColumnTransformer</code> as a way to send column subsets, chosen by name or dtype, to their own transformers. It says this is often the first step of a pipeline when the input is a heterogeneous dataframe.

pandas and polars in, dataframes out

Estimators accept both <code>pandas.DataFrame</code> and <code>polars.DataFrame</code> as input. Transformers can return dataframes through the <code>set_output</code> API.

Native categoricals in histogram gradient boosting

<code>HistGradientBoostingClassifier</code> and <code>HistGradientBoostingRegressor</code> can infer categorical columns from pandas or polars categorical dtypes. You turn this on with <code>categorical_features="from_dtype"</code>.

Some estimators run on GPU without extra dependencies

Since 2023, some estimators can run on GPUs through the experimental Array API support. This requires two things: the input is a PyTorch or CuPy array, and scikit-learn is configured to accept such inputs. The docs call the list "limited but growing".

Watch out for

No deep or reinforcement learning

The FAQ says these do not fit the library's design constraints. The simple multilayer perceptron in <code>sklearn.neural_network</code> only receives bug fixes. For more complex models, the docs point to tensorflow, keras and pytorch.

Categorical features need explicit encoding

Most of the library works on single-dtype numeric arrays, which have no explicit representation for categorical variables. You must convert categorical columns to numbers before most estimators can use them.

Dataframes are converted internally

Dataframe support is described as "limited". Most estimators convert dataframe input into NumPy arrays or SciPy sparse matrices for computation. Dataframe output is generated back from those structures.

Install with pip

pip install -U scikit-learn

More about scikit-learn

Funding
  • Own page: https://numfocus.org/donate-to-scikit-learn

See all

Agent Skills for it
  • scikit-learn: Supports machine learning in Python with scikit-learn. Applies when working with supervised learning (classification, regression), unsupervi
  • scikit-learn: Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning
  • scikit-learn: Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning
  • scikit-learn: Machine learning: clustering, PCA/t-SNE/UMAP, classification, prediction regression (Ridge/Lasso/ensemble), cross-validation, Pipelines. For

See all

Packages around it
  • numpy: Required array dependency
  • pandas: DataFrame input and output
  • python-dotenv: Environment config
  • pydantic: Data validation
  • scipy: Required dependency, sparse matrices
  • fastapi: API serving
More in ML and data science

Alternatives

scikit-learn This page

BSD-3-ClauseGid 8654.3M/wk

Compare scikit-learn with another tool

Get started

Install it.

pip install scikit-learn

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## scikit-learn
- Target Python 3.12 or newer, NumPy 1.26.0 or newer and SciPy 1.11.4 or newer. Add Matplotlib only if you call `plot_*` functions or `*Display` classes.
- Encode categorical features to numeric values before fitting most estimators. The exception is `HistGradientBoostingClassifier`/`HistGradientBoostingRegressor`, which accept `categorical_features="from_dtype"`.
- For heterogeneous dataframes, put a `ColumnTransformer` first in the pipeline and map columns by name or dtype to dedicated transformers.
- Use the `set_output` API to get dataframes back from transformers. Do not assume estimators compute on the dataframe directly.
- Do not put y transformations in a `Pipeline`. Use `TransformedTargetRegressor` for invertible target transforms.
- Do not build deep models on `sklearn.neural_network`, which only receives bug fixes. The docs point to tensorflow, keras or pytorch for those.
- Set the `SKLEARN_SEED` environment variable to control random number generation when running the test suite.

AgentGid articles about scikit-learn

All guides