Top Qs
Timeline
Chat
Perspective
Scikit-learn
Python library for machine learning From Wikipedia, the free encyclopedia
Remove ads
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]
Remove ads
Overview
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]
Remove ads
Features
- Large catalogue of well-established machine learning algorithms and data pre-processing methods (i.e. feature engineering)
- Utility methods for common data-science tasks, such as splitting data into train and test sets, cross-validation and grid search
- Consistent way of running machine learning models (
estimator.fit()
andestimator.predict()
), which libraries can implement - Declarative way of structuring a data science process (the
Pipeline
), including data pre-processing and model fitting
Remove ads
Examples
Fitting a random forest classifier:
>>> from sklearn.ensemble import RandomForestClassifier
>>> 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)
Implementation
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.
Remove ads
History
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.
Applications
Summarize
Perspective
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:
Finance and Insurance
- AXA uses scikit-learn to speed up the compensation process for car accidents and to detect insurance fraud.[9]
- Zopa, a peer-to-peer lending platform, employs scikit-learn for credit risk modelling, fraud detection, marketing segmentation, and loan pricing.[9]
- BNP Paribas Cardif uses scikit-learn to improve the dispatching of incoming mail and manage internal model risk governance through pipelines that reduce operational and overfitting risks.[9]
- J.P. Morgan reports broad usage of scikit-learn across the bank for classification tasks and predictive analytics in financial decision-making.[9]
Retail and E-Commerce
- Booking.com uses scikit-learn for hotel and destination recommendation systems, fraudulent reservation detection, and workforce scheduling for customer support agents.[9]
- HowAboutWe uses it to predict user engagement and preferences on a dating platform.[9]
- Lovely leverages the library to understand user behaviour and detect fraudulent activity on its platform.[9]
- Data Publica uses it for customer segmentation based on the success of past partnerships.[9]
- Otto Group integrates scikit-learn throughout its data science stack, particularly in logistics optimization and product recommendations.[9]
Media, Marketing, and Social Platforms
- Spotify applies scikit-learn in its recommendation systems.[9]
- Betaworks uses the library for both recommendation systems (e.g., for Digg) and dynamic subspace clustering applied to weather forecasting data.[9]
- PeerIndex used scikit-learn for missing data imputation, tweet classification, and community clustering in social media analytics.[9]
- Bestofmedia Group employs it for spam detection and ad click prediction.[9]
Technology
- AWeber uses scikit-learn to extract features from emails and build pipelines for managing large-scale email campaigns.[9]
- Solido applies it to semiconductor design tasks such as rare-event estimation and worst-case verification using statistical learning.[9]
- Evernote, Dataiku, and other tech companies employ scikit-learn in prototyping and production workflows due to its consistent API and integration with the Python ecosystem.[9]
Academia
- Télécom ParisTech integrates scikit-learn in hands-on coursework and assignments as part of its machine learning curriculum.[9]
Remove ads
Awards
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads