-
Notifications
You must be signed in to change notification settings - Fork 96
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
Y label Error. #4
Comments
OpenFE accepts |
And please make sure that |
As the data URL is not available, I manually downloaded the dataset from the link as below: Then I encountered the same issue when I tried to run the provided example.py. Fortunately, I found that it can be solved by simply adding the following code after the definition of these variables into the self._evaluate() and the self.stage2_select() functions of the openfe/openfe.py: # avoid dataframe bug
train_y = np.array(train_y)[:, 0]
train_init = np.array(train_init)[:, 0]
val_y = np.array(val_y)[:, 0]
val_init = np.array(val_init)[:, 0] |
I really appreciate that and thanks a lot for your attention! |
I encountered the same warnning, when I was trying to solve a classification problem instead of a regression one. BTW, all examples in this repository are for regression instead of classification. |
When I tried openFE, the error I got as below.
ofe = openfe() features = ofe.fit(data=X_train_feature, label=Y_train.ravel(), n_jobs=1) D:\miniconda3\lib\site-packages\sklearn\preprocessing\_label.py:133: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel(). y = column_or_1d(y, warn=True)
I guess the source code of OpenFE has not the corresponding processing about label data.
The text was updated successfully, but these errors were encountered: