ValueError: pos_label=1 is not a valid label: array(['N', 'Y'], dtype='<U1')
-
02-11-2019 - |
Pregunta
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 hay solución correcta
Licenciado bajo: CC-BY-SA con atribución
No afiliado a datascience.stackexchange