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 use sklearn.feature_selection.rfe.RFECV with linear_model.LinearRegression as an estimator and it doesn't work because the shape of the coef_ attribute is 1D (n,) when it should be (1,n).
From the documentation for RFECV, it says "The first dimension of the coef_ array must be equal to the number of features of the input dataset of the estimator."
When I use svm.SVR as the estimator, RFECV works, and coef_.shape = (1,n) so I think the shape of linear_model.LinearRegression.coef_ just needs to be changed
The text was updated successfully, but these errors were encountered:
Hi,
I tried to use sklearn.feature_selection.rfe.RFECV with linear_model.LinearRegression as an estimator and it doesn't work because the shape of the coef_ attribute is 1D (n,) when it should be (1,n).
From the documentation for RFECV, it says "The first dimension of the coef_ array must be equal to the number of features of the input dataset of the estimator."
When I use svm.SVR as the estimator, RFECV works, and coef_.shape = (1,n) so I think the shape of linear_model.LinearRegression.coef_ just needs to be changed
The text was updated successfully, but these errors were encountered: