Last answered:

21 Dec 2020

Posted on:

13 Dec 2020

0

Recursive Feature Elimination

Hi, I am working on a machine learning project. I am trying to rank the features using RFE and I kept getting the following error:
ValueError: could not convert string to float: ''

Here is my code:
X = df.drop(['Churn_num'],axis=1)
y = df['Churn_num']
model = LogisticRegression() rfe = RFE(logistic_regression, 11)
rfe = rfe.fit(X, y)
print('Selected features: %s' % list(X.columns[rfe.support_])) What am I doing wrong and how can I fix it? Thank you, Indy
1 answers ( 0 marked as helpful)
Instructor
Posted on:

21 Dec 2020

0
Hi Inderjeet,  thank you so much for reaching out! Could you please share which lecture or course your question is related to? Thank you so much in advance!   Best,  The 365 Team

Submit an answer