{
 "kind": "tool",
 "slug": "scikit-learn",
 "path": "tools/scikit-learn/",
 "name": "scikit-learn",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "ML and data science",
   "tools/ml-data-science/"
  ]
 ],
 "lead": "Python machine learning library with classification, regression and clustering algorithms.",
 "chips": [
  {
   "label": "ML and data science",
   "path": "tools/ml-data-science/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install scikit-learn"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/scikit-learn/scikit-learn"
  },
  {
   "label": "Website",
   "href": "https://scikit-learn.org"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "BSD-3-Clause",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI license expression.",
   "src": "https://github.com/scikit-learn/scikit-learn"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Sep 11, 2026. ",
   "src": "https://github.com/scikit-learn/scikit-learn"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "135 projects",
   "status": "info",
   "sub": "#3 of 293 in its category",
   "note": "Dependency in 135 public GitHub projects set up for AI coding agents that we scanned (2.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "4 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What scikit-learn does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "scikit-learn popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "86",
       "of": "/ 100",
       "l": "Gid Score, #36 overall"
      },
      {
       "n": "54.3M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "68.3K",
       "l": "GitHub stars"
      },
      {
       "n": "135",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How scikit-learn is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "73 projects, 2.2%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "70 projects, 2.3%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "51 projects, 2.1%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "16 projects, 4.8%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "9 projects, 3.2%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "7 projects, 1.5%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "5 projects, 1.1%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 86.7% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 76.3% of its projects",
       "v": "pandas",
       "path": "tools/pandas/"
      },
      {
       "l": "In 51.1% of its projects",
       "v": "Matplotlib",
       "path": "tools/matplotlib/"
      },
      {
       "l": "In 49.6% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 49.6% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 48.1% of its projects",
       "v": "Requests",
       "path": "tools/requests-py/"
      },
      {
       "l": "In 46.7% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      },
      {
       "l": "In 46.7% of its projects",
       "v": "SciPy",
       "path": "tools/scipy/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "scikit-learn in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "ColumnTransformer handles mixed-type frames",
       "v": "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."
      },
      {
       "l": "pandas and polars in, dataframes out",
       "v": "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."
      },
      {
       "l": "Native categoricals in histogram gradient boosting",
       "v": "<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>."
      },
      {
       "l": "Some estimators run on GPU without extra dependencies",
       "v": "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\"."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "No deep or reinforcement learning",
       "v": "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."
      },
      {
       "l": "Categorical features need explicit encoding",
       "v": "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."
      },
      {
       "l": "Dataframes are converted internally",
       "v": "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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Install with pip"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Bash",
       "code": "pip install -U scikit-learn"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about scikit-learn",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "Own page: https://numfocus.org/donate-to-scikit-learn"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "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"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "numpy: Required array dependency",
        "pandas: DataFrame input and output",
        "python-dotenv: Environment config",
        "pydantic: Data validation",
        "scipy: Required dependency, sparse matrices",
        "fastapi: API serving"
       ]
      },
      {
       "title": "More in ML and data science",
       "path": "tools/ml-data-science/",
       "items": [
        {
         "text": "NumPy",
         "path": "tools/numpy/"
        },
        {
         "text": "pandas",
         "path": "tools/pandas/"
        },
        {
         "text": "SciPy",
         "path": "tools/scipy/"
        },
        {
         "text": "PyTorch",
         "path": "tools/torch/"
        },
        {
         "text": "Sentence Transformers",
         "path": "tools/sentence-transformers/"
        },
        {
         "text": "Hugging Face Transformers",
         "path": "tools/transformers/"
        },
        {
         "text": "Chroma (Python)",
         "path": "tools/chromadb-pypi/"
        },
        {
         "text": "NetworkX",
         "path": "tools/networkx/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "scikit-learn",
       "me": true,
       "facts": [
        "BSD-3-Clause",
        "Gid 86",
        "54.3M/wk"
       ]
      }
     ],
     "more": "Compare scikit-learn with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install scikit-learn"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## scikit-learn\n- 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.\n- Encode categorical features to numeric values before fitting most estimators. The exception is `HistGradientBoostingClassifier`/`HistGradientBoostingRegressor`, which accept `categorical_features=\"from_dtype\"`.\n- For heterogeneous dataframes, put a `ColumnTransformer` first in the pipeline and map columns by name or dtype to dedicated transformers.\n- Use the `set_output` API to get dataframes back from transformers. Do not assume estimators compute on the dataframe directly.\n- Do not put y transformations in a `Pipeline`. Use `TransformedTargetRegressor` for invertible target transforms.\n- Do not build deep models on `sklearn.neural_network`, which only receives bug fixes. The docs point to tensorflow, keras or pytorch for those.\n- Set the `SKLEARN_SEED` environment variable to control random number generation when running the test suite.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi scikit-learn"
  ],
  [
   "Category",
   "ML and data science"
  ],
  [
   "License",
   "BSD-3-Clause"
  ],
  [
   "Latest version",
   "1.9.1, September 11, 2026"
  ],
  [
   "On GitHub since",
   "August 2010"
  ],
  [
   "Gid Score",
   "85.8"
  ],
  [
   "Rank in category",
   "#3 of 293"
  ],
  [
   "GitHub",
   "scikit-learn/scikit-learn"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [
  "Used by J.P.Morgan, Spotify, Inria, betaworks, as listed by the source; we have not checked each one."
 ],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/scikit-learn.png"
}