I have a classification problem and I would like to test all the available algorithms to test their performance in tackling the problem. If you know any classification algo
Here's a more up-to-date solution:
from sklearn.utils import all_estimators
estimators = all_estimators(type_filter='classifier')
all_clfs = []
for name, ClassifierClass in estimators:
print('Appending', name)
try:
clf = ClassifierClass()
all_clfs.append(clf)
except Exception as e:
print('Unable to import', name)
print(e)
UPDATE The previous code stopped working because some estimators required an estimator as init parameter. Hence I updated the code with a try...except. Here's a colab code with it working.