## 3 Development of the System
### Upload Data to Generate the Predictive Models
Thus, for the cohort of the weekdays the attributes which were most influential were, maximum, minimum and average temperatures, relative humidity, day of the week and air quality. However, for the cohort of the holidays the main weight was the day of the week and then, to a lesser extent, the month, maximum, minimum and average temperatures, and relative humidity. In both cases the rain had no influence on any of the target attributes. The most important thing about the system was the correct choice of the data mining algorithms for the models. The GLM [30] regression algorithm was used for the cohort of working days data. This algorithm had an absolute error of 2.11% when compared to the prediction results with the actual data of 2018. The GLM algorithm is suitable for predictions where the target distribution is likely to follow a non-normal distribution, such as a multinomial or Poisson distribution. Similarly, GLM is useful when the relationship of the variables is not linear. The distribution of the variables and the prediction can be seen in Figure 4. Here, it is shown in a single graph the relationship between the predictor variables and the target attribute, i.e., the number of medical attendances at the health centre. Two axes are used for its representation: The first vertical axis indicates the temperature in degrees Celsius and the percentage of relative humidity. Additionally, the second indicates the number of medical attendances. The figure shows a direct relationship between relative humidity and the number of patients who visited the health centre, and an inverse relationship with temperature, i.e., the higher the temperature, the lower the number of visits. Furthermore, the figure shows that air quality had no relationship with the target attribute. In the case of non-working days, the best performing algorithm was SVM with linear kernel [31], which had an absolute error in prediction of 5.4%. This algorithm performs well on data sets that have many attributes, even if there are very few cases on which to train the model. There is no upper limit on the number of attributes; the only constraints are those imposed by hardware. Traditional neuronal networks do not perform well under these circumstances. In our case, the non-working day cohort was much lower than that of the working days because normally one week has two non-working days and five working days, and this problem was compounded when holidays fall on weekdays. For this type of data, the training data was minimal. Figure 5 shows the relation between the number of visits with the attributes involved in the study. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Attribute Name** & **Cohort Weekday** & **Cohort Day Weekend** \\ \hline Month & 0.34 & 0.12 \\ Minimum temperature & 0.28 & 0.05 \\ Maximum temperature & 0.21 & 0.03 \\ Mean temperature & 0.25 & 0.04 \\ Day of the week & 0.06 & 0.37 \\ Relative humidity & 0.11 & 0.09 \\ air quality & 0.05 & 0.02 \\ Rain fall & \(-\)0.06 & \(-\)0.12 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Weight assigned to each attribute. In general, the relationship between weather variables and the number of medical attendances had a different trend on public holidays than on working days. In contrast to what can be seen in Figures 4 and 5 confirms that patients who came to the health centre on public holidays were usually for emergencies, which means that weather conditions did not influence the patient's visit to the health centre.