Exercise

One-line evaluation

Although constant progress is being made, not all outputs of your modeling and evaluation algorithms come in a human readable shape.

Very often they come in plain arrays of unnamed values, requiring you to read through the documentation in order to interpret what each value means.

In such cases it is again clever to make wrapper functions that format and return the results in a neat and understandable way.

The evaluation result, stored in the variable score, is an array whose first element is the loss and the second accuracy of the model over the given dataset.

Instructions

100 XP
  • Place the input variables x_test and y_test into the appropriate arguments of the model's .evaluate() method.
  • Use the first element of the score array to print out the loss and the second element to print out the resulting accuracy.