ValueError: pos_label=1 is not a valid label: array(['N', 'Y'], dtype='<U1')
-
02-11-2019 - |
Question
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?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange