| scikit-learn | |
|---|---|
| | |
| Original author | David Cournapeau |
| Developer | Google Summer of Code project |
| Initial release | June 2007 |
| Stable release | 1.8.0 [1] / 10 December 2025 |
| Repository | |
| Written in | Python, Cython, C and C++ [2] |
| Operating system | Linux, macOS, Windows |
| Type | Library for machine learning |
| License | New BSD License |
| Website | scikit-learn |
| This article is part of a series on |
| Python |
|---|
| |
scikit-learn (formerly scikits.learn and also known as sklearn) is a free and open-source machine learning library for the Python programming language. [3] It features various classification, regression and clustering algorithms including support-vector machines, random forests, gradient boosting, k-means and DBSCAN, and is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy. Scikit-learn is a NumFOCUS fiscally sponsored project. [4]
The scikit-learn project started as scikits.learn, a Google Summer of Code project by French data scientist David Cournapeau. The name of the project derives from its role as a "scientific toolkit for machine learning", originally developed and distributed as a third-party extension to SciPy. [5] The original codebase was later rewritten by other developers.[ who? ] In 2010, contributors Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort and Vincent Michel, from the French Institute for Research in Computer Science and Automation in Saclay, France, took leadership of the project and released the first public version of the library on February 1, 2010. [6] In November 2012, scikit-learn as well as scikit-image were described as two of the "well-maintained and popular" scikits libraries [update] . [7] In 2019, it was noted that scikit-learn is one of the most popular machine learning libraries on GitHub. [8] At that time, the project had over 1,400 contributors and the documentation received 42 million visits in 2018. [9] According to a 2022 Kaggle survey of nearly 24,000 respondents from 173 countries, scikit-learn was identified as the most widely used machine learning framework. [10]
estimator.fit() and estimator.predict()), which libraries can implementPipeline), including data pre-processing and model fittingFitting a random forest classifier:
>>>fromsklearn.ensembleimportRandomForestClassifier>>>classifier=RandomForestClassifier(random_state=0)>>>X=[[1,2,3],# 2 samples, 3 features...[11,12,13]]>>>y=[0,1]# classes of each sample>>>classifier.fit(X,y)RandomForestClassifier(random_state=0)scikit-learn is largely written in Python, and uses NumPy extensively for high-performance linear algebra and array operations. Furthermore, some core algorithms are written in Cython to improve performance. Support vector machines are implemented by a Cython wrapper around LIBSVM; logistic regression and linear support vector machines by a similar wrapper around LIBLINEAR. In such cases, extending these methods with Python may not be possible.
scikit-learn integrates well with many other Python libraries, such as Matplotlib and plotly for plotting, NumPy for array vectorization, Pandas dataframes, SciPy, and many more.
scikit-learn was initially developed by David Cournapeau as a Google Summer of Code project in 2007. Later that year, Matthieu Brucher joined the project and started to use it as a part of his thesis work. In 2010, INRIA, the French Institute for Research in Computer Science and Automation, got involved and the first public release (v0.1 beta) was published in late January 2010.
The project released its first stable version, 1.0.0, on September 24, 2021. [11] The release was the result of over 2,100 merged pull requests, approximately 800 of which were dedicated to improving documentation. [12] Development continues to focus on bug fixes, efficiency and feature expansion.
The latest version, 1.8, was released on December 10, 2025. [11] This update introduced native Array API support, enabling the library to perform GPU computations by directly using PyTorch and CuPy arrays. This version also included bug fixes, improvements and new features, such as efficiency improvements to the fit time of linear models. [13]
Scikit-learn is widely used across industries for a variety of machine learning tasks such as classification, regression, clustering, and model selection. The following are real-world applications of the library: