To create and fit a deep neural network model for a regression problem, we will make use of Keras. The code used for the model architecture is as follows:
# Model architecture
model <- keras_model_sequential()
model %>%
layer_dense(units = 10, activation = 'relu', input_shape = c(13)) %>%
layer_dense(units = 5, activation = 'relu') %>%
layer_dense(units = 1)
summary(model)
OUTPUT
___________________________________________________________________________ Layer (type) Output Shape Param # =============================...