Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with GridSearch #28

Open
zzirend opened this issue Aug 4, 2021 · 6 comments
Open

Problem with GridSearch #28

zzirend opened this issue Aug 4, 2021 · 6 comments

Comments

@zzirend
Copy link

zzirend commented Aug 4, 2021

Hello,
Hope you are doing very well.
I run the model in order to determine the best model (with GridSearch). But it runs with the following problem:
'GradientBoostingClassifier' object has no attribute 'presort'

I couldn't fix it. please help me.
Thank you

@x4nth055
Copy link
Owner

x4nth055 commented Sep 4, 2021

Hey @zzirend ,

What specific error is raised? in which file and line? Can you please send the traceback?

Thanks,

@NeneMatsuki
Copy link

Hi, I am getting the same problem, and here is the error message:

Traceback (most recent call last):
File "C:\Users\nene.matsuki\Documents\GitHub\emotion-recognition-using-speech\grid_search.py", line 28, in
d = EmotionRecognizer(model, emotions=emotions,model_name = f"grid/{model.class.name}", features = features)
File "C:\Users\nene.matsuki\Documents\GitHub\emotion-recognition-using-speech\emotion_recognition.py", line 87, in init
if not model:
File "C:\Users\nene.matsuki\Anaconda3\envs\emotion_recognition_using_speec\lib\site-packages\sklearn\ensemble_base.py", line 180, in len
return len(self.estimators_)
AttributeError: 'GradientBoostingClassifier' object has no attribute 'estimators_'

Thanks :)

@ruchirsachdeva
Copy link

Hi @x4nth055 , I am getting the same problem as well

    if not model:
  File "/Users/ruchirs/ser/emotion-recognition-using-speech/emo-env/lib/python3.9/site-packages/sklearn/ensemble/_base.py", line 180, in __len__
    return len(self.estimators_)
AttributeError: 'RandomForestClassifier' object has no attribute 'estimators_'

@x4nth055
Copy link
Owner

x4nth055 commented Mar 5, 2022

Hey @ruchirsachdeva and @NeneMatsuki,

I just tried to run the grid_search.py script and it worked fine, I think it's related to sklearn's version, please downgrade to 0.24.2 to be able to run the project properly:

$ pip install scikit-learn==0.24.2

Please let me know if it persists.

@stardiviner
Copy link

Hi @x4nth055 , I am getting the same problem as well

    if not model:
  File "/Users/ruchirs/ser/emotion-recognition-using-speech/emo-env/lib/python3.9/site-packages/sklearn/ensemble/_base.py", line 180, in __len__
    return len(self.estimators_)
AttributeError: 'RandomForestClassifier' object has no attribute 'estimators_'

I got same error.

@x4nth055 I tried this version scikit-learn. Still same problem.

@fujiantaoshan
Copy link

嗨,我也遇到了同样的问题

    if not model:
  File "/Users/ruchirs/ser/emotion-recognition-using-speech/emo-env/lib/python3.9/site-packages/sklearn/ensemble/_base.py", line 180, in __len__
    return len(self.estimators_)
AttributeError: 'RandomForestClassifier' object has no attribute 'estimators_'

我遇到了同样的错误。

我尝试了这个版本。还是同样的问题。scikit-learn

您好麻烦问一下您解决这个问题了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants