## 4 Experiments and Results
### Experimental Settings  
The proposed deep learning algorithm was implemented in Python 3.7.3. A neural network can learn something different from what its trainer had in mind [41]. A case of useless learning is when the neural network memorizes the training examples without learning what they have in common. A trained network is able to generalize when it can classify data from the same class as the learning data but that it has never seen before. This ability requires that the network is tested with an independent dataset. Therefore, the data samples were divided as follows: 70% of the samples were used for the training dataset (70% of 2498 records = 1748 records for the training phase) and 30% for the testing dataset (30% of 2498 records = 750 for the testing phase). The input attributes were normalized. The proposed DNN consists of one input layer with 7 neurons that match the 7 input attributes, 6 hidden layers each with 300 neurons, and one output layer with one neuron for the modeling target. Our proposed DNN was trained for the beach visitors classification task. In the dataset, the number of beach visitors was assigned to one of the 7 classes (or beach occupancy levels): 0-49, 50-99, 100-149, 150-199, 200-249, 250-299, and 300+. The class distribution is shown in Table 1. The total number of records (1748) refers to the training phase. Overfitting refers to a deep learning model that has a small loss function on the training data, and the prediction accuracy is high; however, on the test data, the loss function is relatively large and the prediction accuracy is low. To overcome the overfitting constraint, a grid search was conducted to find the best hyperparameters of the deep neural network using 10-fold cross validation. In a 10-fold cross validation scheme, the dataset is divided into 10 blocks of approximately equal size. In this case, 90% or 9 blocks of the data are used for training, and 10% or 1 block of the data is used for testing. This process is repeated 10 times, with a different data block used for testing each time. Table 2 shows the number of training and testing instances in each partition scheme. The total number of \begin{table}
\begin{tabular}{c c c} \hline \hline
**Classes** & **Number of Samples** & **Percentage of Total Samples** \\ \hline
**0–49** & 272 & 15.56 \\
**50–99** & 685 & 39.19 \\
**100–149** & 372 & 21.28 \\
**150–199** & 280 & 16.02 \\
**200–249** & 17 & 0.97 \\
**250–299** & 91 & 5.20 \\
**300+** & 31 & 1.77 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Class distribution of beach visitors. Figure 8: Different spatial distribution patterns with maximum beach occupancy levels in 2018 (**left**) and 2020 (**right**). records for the training (1748) and testing (750) phases is specified. The resulting values for the hyperparameters of the neural network training are presented in Table 3. In order to solve the overfitting problem, we also introduced the dropout parameter (dropout value of 0.1), which achieved the regularization effect. We evaluated the SGD, RMSprop, Adam, Adagrad, Adamax, and Nadam optimizers using the grid search technique. The Adaptive Moment Estimation (Adam) optimizer was selected to minimize the loss function and speed up the training process because it obtains the best results. The Adam optimizer is one of the most popular gradient descent optimization algorithms since it is computationally efficient and has very little memory requirement. This method calculates the individual adaptive learning rate for each parameter from estimates of first and second moments of the gradients. The Adam algorithm (see Algorithm 1) first updates the exponential moving averages of the gradient (\(m_{t}\)) and the squared gradient (\(v_{t}\)), which is the estimate of the first and second moment.