Pergunta

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?

Nenhuma solução correta

Licenciado em: CC-BY-SA com atribuição
scroll top