You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i tried to specify few classifiers names in LazyClassfier functionbut it ended up with the following error
ValueError: too many values to unpack (expected 2)
'str' object has no attribute '__name__'
Invalid Classifier(s)
0%| | 0/4 [00:00<?, ?it/s]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[27], line 1
----> 1 models,predictions = clf.fit(X_train, X_test, y_train, y_test)
File [~/dataneuron/lazypredev/lib/python3.8/site-packages/lazypredict/Supervised.py:288](https://vscode-remote+wsl-002bubuntu-002d20-002e04.vscode-resource.vscode-cdn.net/home/rishab/dataneuron/~/dataneuron/lazypredev/lib/python3.8/site-packages/lazypredict/Supervised.py:288), in LazyClassifier.fit(self, X_train, X_test, y_train, y_test)
285 print(exception)
286 print("Invalid Classifier(s)")
--> 288 for name, model in tqdm(self.classifiers):
289 start = time.time()
290 try:
ValueError: too many values to unpack (expected 2)
i gave classifiers = ['LogisticRegression','RandomForest','SVC'] as the input in LazyClassfier function
The text was updated successfully, but these errors were encountered:
This is the correct way to set a list of classifiers, is not a list of strings:
from sklearn.utils import all_estimators
from sklearn.base import ClassifierMixin
removed_classifiers = [
"ClassifierChain",
"ComplementNB",
"GradientBoostingClassifier",
"GaussianProcessClassifier",
"HistGradientBoostingClassifier",
"MLPClassifier",
"LogisticRegressionCV",
"MultiOutputClassifier",
"MultinomialNB",
"OneVsOneClassifier",
"OneVsRestClassifier",
"OutputCodeClassifier",
"RadiusNeighborsClassifier",
"VotingClassifier",
'SVC','LabelPropagation','LabelSpreading','NuSV','CategoricalNB ']
classifiers_list = [est for est in all_estimators() if (issubclass(est[1], ClassifierMixin) and (est[0] not in removed_classifiers))]
i tried to specify few classifiers names in LazyClassfier functionbut it ended up with the following error
ValueError: too many values to unpack (expected 2)
i gave classifiers = ['LogisticRegression','RandomForest','SVC'] as the input in LazyClassfier function
The text was updated successfully, but these errors were encountered: