Results

To further explore any changes in the image-classification performance of the model that may not be obvious from a graphical summary, let's look at some numerical summaries:

  1. We will look at the results based on the training data first, and will make use of the following code:
# Loos and accuracymodel %>% evaluate(trainx, trainLabels)OUTPUT12/12 [==============================] - 0s 198us/step$loss[1] 0.03438224643$acc[1] 1# Confusion matrixpred <- model %>%   predict_classes(trainx)table(Predicted=pred, Actual=trainy)OUTPUT         ActualPredicted 0 1 2        0 3 0 0        1 0 3 0        2 0 0 3

From the preceding output, we can see that the loss value has now reduced to 0.034 and the accuracy is maintained at 1.0. We obtain the same confusion matrix results ...

Get Advanced Deep Learning with R now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.