In analogy to How to list all scikit-learn classifiers that support predict_proba() I want to retrieve a list of all classification/regression/clustering algorithms currently supported in scikit-learn.
Finally we will use three different algorithms (Naive-Bayes, LinearSVC, K-Neighbors Classifier) to make predictions and compare their performance using methods like accuracy_score() provided by the scikit-learn library.
Scikit-learn is the most popular Python library for performing classification, regression, and clustering algorithms. It is an essential part of other Python data science libraries like matplotlib , NumPy (for graphs and visualization), and SciPy (for mathematics).
Three types of Machine Learning Models can be implemented using the Sklearn Regression Models: Reinforced Learning. Unsupervised Learning. Supervised Learning.
In Regression, the output is a continuous or numerical value. In Classification, the output is a discrete or categorical value. Regression model maps the input variable(x) with the continuous output variable(y). Classification model maps the input variable(x) with the discrete output variable(y).
Combining How to list all scikit-learn classifiers that support predict_proba() and http://scikit-learn.org/stable/modules/classes.html#module-sklearn.base yields the solution:
from sklearn.utils.testing import all_estimators
from sklearn import base
estimators = all_estimators()
for name, class_ in estimators:
if issubclass(class_, base.ClassifierMixin):
print(name)
Or use any other base class: ClusterMixin, RegressorMixin, TransformerMixin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With