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 so much for reaching out! Could you please share which lecture or course your question is related to? Thank you so much in advance!
The 365 Team