scikit-learn-contrib / boruta_py

Python implementations of the Boruta all-relevant feature selection method.
BSD 3-Clause "New" or "Revised" License
1.46k stars 252 forks source link

TypeError: must be str, not ValueError #40

Closed mauriciochamas closed 6 years ago

Taakn commented 6 years ago

@mauriciochamas I'm getting the same error. did you manager to fix it? Thanks!

mauriciochamas commented 6 years ago

sys.path.append(r'C:\Users\Usuario\AnacondaProjects\scikit-learn-contrib-boruta_py-c370f01') from boruta import BorutaPy base = df.values x = base[:, 1:] y = base[:, 0]

zhengzhuang3 commented 6 years ago

I am also getting the same error. Could you please explain how it happens and how to fix this issue? Thanks!

AdityaSoni19031997 commented 6 years ago

The solution is written above

zhengzhuang3 commented 6 years ago

Thank you. My error has changed as follows. I wonder whether Boruta can handle regression cases where y is a continuous 1-D array

ValueError: Please check your X and y variable. The providedestimator cannot be fitted to your data. Unknown label type: 'continuous'

AdityaSoni19031997 commented 6 years ago

It can handle provided you are doing exactly what needs to be done...

It's not necessary that the error that the above person had received and what you are receiving are because of the same thing...,

So think logically what you are doing and then act accordingly

zhengzhuang3 commented 6 years ago

My task is to select features for doing prediction. But I am getting the error. I am new to feature selection algorithms, do you know how to fix this issue? Thanks!

ValueError: Please check your X and y variable. The providedestimator cannot be fitted to your data. Unknown label type: 'continuous'