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

model accuracy #13

Open
xuzhang5788 opened this issue Apr 30, 2018 · 0 comments
Open

model accuracy #13

xuzhang5788 opened this issue Apr 30, 2018 · 0 comments

Comments

@xuzhang5788
Copy link

in your train_*.py, at the end, your code is like this:
yPreds = model.predict(testX)
yPred = np.argmax(yPreds, axis=1)
yTrue = testY

accuracy = metrics.accuracy_score(yTrue, yPred) * 100
error = 100 - accuracy
print("Accuracy : ", accuracy)
print("Error : ", error)

  1. I don't understand why you used np.argmax(Preds, axis=1). I think you should use
    yPreds[yPreds >= 0.5] = 1
    yPreds[yPreds < 0.5] = 0
    yPred = yPreds

  2. When you used model.predict, which weights did you use? the last one or the best one?

Many thanks

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