ValueError: pos_label=1 is not a valid label: array(['N', 'Y'], dtype='<U1')
-
02-11-2019 - |
Frage
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?
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit datascience.stackexchange