emotion-recognition-using-speech icon indicating copy to clipboard operation
emotion-recognition-using-speech copied to clipboard

Problem with GridSearch

Open zzirend opened this issue 3 years ago • 6 comments

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

zzirend avatar Aug 04 '21 23:08 zzirend

Hey @zzirend ,

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

Thanks,

x4nth055 avatar Sep 04 '21 15:09 x4nth055

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 :)

NeneMatsuki avatar Jan 13 '22 09:01 NeneMatsuki

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_'

ruchirsachdeva avatar Feb 24 '22 00:02 ruchirsachdeva

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.

x4nth055 avatar Mar 05 '22 09:03 x4nth055

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.

stardiviner avatar May 09 '22 11:05 stardiviner

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

    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

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

fujiantaoshan avatar Apr 26 '24 04:04 fujiantaoshan