Model evaluation is an important step in the process of arriving at a suitable prediction model. A model may show good performance with training data that was used for developing the model; however, the real test of a model is with data that the model has not yet seen. Let's look at the model performance based on the test data.
Model evaluation and prediction
Evaluation
The performance of the model is evaluated using the evaluate function with the help of the test data shown in the following code:
# Model evaluation
model %>% evaluate(test, testtarget)
OUTPUT
## $loss
## [1] 31.14591
##
## $mean_absolute_error
## [1] 3.614594
From the preceding output, we can see that the loss and mean absolute error for the test...