How to interpret the output of model.evaluate function?

3,780 views
Skip to first unread message

Nagabhushan Baddi

unread,
Jun 13, 2016, 6:01:38 AM6/13/16
to Keras-users
Dear All,
   I have a fit a model of a binary classifier. The test set has 10002 examples. Here is the output of evaluate method:

>>> model.evaluate(xT, yT, batch_size=100)
 8500/10002 [========================>.....] - ETA: 0s[0.64749416913349278, 0.59
738052658136309]

How to interpret the message above? What is the accuracy of the model in % according to the output above? 

Thanks and regards,
Nagabhushan

Matias Valdenegro

unread,
Jun 13, 2016, 10:08:42 AM6/13/16
to keras...@googlegroups.com
Assuming your model was compiled with the accuracy metrics, then the first
element in evaluate's return is the loss value, and the second is the
accuracy, so your model has 59% accuracy.

PD: It is not necessary to post questions more than once.


simply....@gmail.com

unread,
Jun 6, 2017, 2:23:51 AM6/6/17
to Keras-users
I am getting a similar output, and curious to understand - why the evaluate function does not cover all the datapoints?
In Nagbhushan's output it has covered only 8500/10002 datapoints and in mine it has covered only 32/768 datapoints.

scores = model.evaluate(X,Y)
print("\n%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))

 32/768 [>.............................] - ETA: 0s
acc: 75.52%

Thanks.

Klemen Grm

unread,
Jun 9, 2017, 6:04:55 AM6/9/17
to Keras-users, simply....@gmail.com
That's probably just an error rendering the progress bar. You can verify it by getting the model predictions and calculating the accuracy separately.
Reply all
Reply to author
Forward
0 new messages