Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: name 'X_val_prep' is not defined #120

Open
Aisha5 opened this issue Jul 15, 2020 · 0 comments
Open

NameError: name 'X_val_prep' is not defined #120

Aisha5 opened this issue Jul 15, 2020 · 0 comments

Comments

@Aisha5
Copy link

Aisha5 commented Jul 15, 2020

Hello
I have written the following code:

validate on val set
predictions = model.predict(X_val_prep)
predictions = [1 if x>0.5 else 0 for x in predictions]

accuracy = accuracy_score(y_val, predictions)
print('Val Accuracy = %.2f' % accuracy)

confusion_mtx = confusion_matrix(y_val, predictions)
cm = plot_confusion_matrix(confusion_mtx, classes = list(labels.items()), normalize=False)

NameError: name 'X_val_prep' is not defined

Could you help me how I should tackle it?
thank u very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant