Scikit-learn
scikit-learn
|
|
---|---|
Basic data
|
|
developer | David Cournapeau |
Current version |
0.23.2 ( August 4, 2020 ) |
operating system | Platform independent |
programming language | Python , C , C ++ , Cython |
License | 3-clause BSD license |
scikit-learn.org |
Scikit-learn (formerly scikits.learn) is a free software - library for machine learning for the programming language Python . It offers various classification , regression and clustering algorithms, including support vector machines , random forest , gradient boosting , k-means and DBSCAN . As SciKit (short for SciPy Toolkit), like Scikit-image , for example , it is based on the numerical and scientific Python libraries NumPy and SciPy .
This library is used in several German textbooks published in 2017.
implementation
Scikit-learn is largely written in Python. Some core algorithms were implemented in Cython for performance reasons. Support vector machines are implemented by a Cython wrapper around LIBSVM; logistic regression and linear support vector machines through a similar wrapper around LIBLINEAR.
Examples
Classification with the k-Nearest-Neighbor-Algorithm
The training data set is the Iris flower data set consisting of 50 observations each of three species of irises (Iris Setosa , Iris Virginica and Iris Versicolor ), on each of which four attributes of the flowers were recorded: the length and the width of the sepalum ( Sepal ) and the petalum ( petal ).
from sklearn import neighbors, datasets
iris = datasets.load_iris()
X, y = iris.data, iris.target
knn = neighbors.KNeighborsClassifier(n_neighbors=1)
knn.fit(X, y)
print("Welche Art von Schwertlilie (Iris Setosa, Iris Virginica oder Iris Versicolor)")
print("hat ein 3cm x 5cm Sepalum (Kelchblatt) und ein 4cm x 2cm Petalum (Kronblatt)")
print("Antwort: ",iris.target_names[knn.predict([[3, 5, 4, 2]])])
A deep analysis of this data set with scikit-learn has been described in detail several times.
Web links
Individual evidence
- ↑ Release 0.23.2 . August 4, 2020 (accessed August 14, 2020).
- ↑ The scikit-learn Open Source Project on Open Hub: Languages Page . In: Open Hub . (accessed on July 14, 2018).
- ↑ Andreas C. Müller, Sarah Guido: Introduction to Machine Learning with Python . O'Reilly-Verlag, Heidelberg 2017, ISBN 978-3-96009-049-6 .
- ↑ Sebastian Raschka: Machine Learning with Python . mitp-Verlag, Frechen 2017, ISBN 978-3-95845-422-4 .
- ↑ Matthias Parbel: Oliver Zeigermann: Interactive introduction to machine learning with Scikit-Learn. heise Developer, accessed on August 28, 2018 (German).
- ↑ Oliver Zeigermann: Jupyter Notebook on the lecture: Machine Learning with Scikit-Learn. Retrieved August 28, 2018 .
- ↑ Gael Varoquaux: 3.6. scikit-learn: machine learning in Python - Scipy lecture notes. In: Tutorials on the scientific Python ecosystem: a quick introduction to central tools and techniques. Accessed August 28, 2018 .