ValueError: pos_label=1 is not a valid label: array(['N', 'Y'], dtype='<U1')
X = train_encoded_df.iloc[:, 1: ]
y = train_encoded_df["Loan_Status"]
print("Precision:",metrics.precision_score(y_test, y_pred))
My training data contains the categorical features encoded using get_dummies()
.
This is causing the error:
ValueError: pos_label=1 is not a valid label: array(['N', 'Y'], dtype='U1')
How to fix this?
Topic data-analysis anaconda data python machine-learning
Category Data Science