Results

The following figure provides the loss and mean absolute error for model_two over 100 epochs:

From the preceding figure, we can make the following observations:

  • The mean absolute error and loss values for the training and validation data drop very quickly to low values, and after about 30 epochs, we do not see any major improvement.
  • There is no evidence of overfitting as the training and validation errors seem closer to each other.

We can obtain the loss and mean absolute error values for the test data using the following code:

# Model evaluation
model %>% evaluate(test, testtarget)

OUTPUT
## $loss
## [1] 24.70368
##
## $mean_absolute_error
## [1] 3.02175

pred <- model %>% predict(test)
plot(testtarget, pred,
xlab = 'Actual',
ylab = 'Prediction')
abline(a=0,b=1)

The loss and mean absolute error values using the test data and model_two are obtained as 24.70 and 3.02 respectively. This is a significant improvement compared to the results that we obtained from model_one.

We can visually see this improvement using the scatter plot for the predicted values versus the actual response values in the following graph:

From the preceding graph, we can see that the spread in the scatter plot of actual versus predicted values is visibly less than that of the earlier scatter plot. This indicates better prediction performance compared to the previous model. Although model_two performs better than the previous model, at higher values, we can see the occurrence of significant underestimation of the target values. So, although we have developed a better model, we can also further explore the potential for the further improvement of this prediction model.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset