🛠️ Scheduled Maintenance | We’ll be undergoing scheduled maintenance and upgrades between 00:00 PST Jan 26th until 00:00 PST Jan 28th. There may be brief interruption of services in that period. We apologize for the inconvenience.

×
The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

Recursive Feature Elimination

Recursive Feature Elimination

0
Votes
1
Answer

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 Answer

365 Team
0
Votes

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