We can now calculate the accuracy rate of our deep learning model built on Keras.
Evaluating the recommendation engine's accuracy
Getting ready
Evaluating a Sequential model for accuracy requires using the model.evaluate() function within Keras.
How to do it...
We can simply calculate the accuracy score, accuracy_rate, by executing the following script:
score = model.evaluate(xtest_array, ytest_OHE, batch_size=128)
accuracy_rate = score[1]*100
print('accuracy is {}%'.format(round(accuracy_rate,2)))