# LSTM DSS Automatism and Dataset Optimization for Diabetes Prediction+
## 4 Discussion
A good procedure to follow is:  
* Phase 1: Collecting patient data (by means of a well-structured database system allowing different data mining processing);
* Phase 2: Pre-clustering and filtering of patient data (construction of a stable training dataset);
* Phase 3: Pre-analysis of correlations between attributes and analysis of data dispersions;
* Phase 4: Execution of the LSTM neural network algorithm by processing simultaneously different attributes (multi-attribute data processing);
* Phase 5: Comparison of results by changing the testing dataset;
* Phase 6: Choice of the best model to adopt following the analysis of phase 5. We observe that by repeating the calculation of the random testing datasets, same range values are obtained of the plots of Figures 8-15, thus confirming the validity of the result discussion. The limitations and advantages of the proposed study are summarized in the following Table 7:  
Concerning dataset optimization has increased the LSTM performances by adding artificial data into the training dataset by defining the DSS automatism represented by the flow chart of Figure 15: The LSTM neural network model is applied automatically when the training dataset is constructed with enough data, otherwise a new training dataset will be formulated by artificial data (LSTM-AR-model) following the criteria discussed in Section 3. The flowchart of Figure 15 summarizes all the concepts discussed in this paper. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**AUC**} & **AUC \textless{} 0.5** & **AUC \textless{} 0.5 (50\%)** \textless{} & **0.7 (70\%)** \textless{} & **0.9 (90\%)** \textless{} & **AUC \textless{} 1** \\  & **(50\%)** & **AUC \textless{} 0.7** & **AUC \textless{} 0.9** & **AUC \textless{} 1 (100\%)** & **AUC \textless{} 1** \\ \hline Classification of the & \multirow{2}{*}{No sense test} & \multirow{2}{*}{Non-informative test} & \multirow{2}{*}{Inaccurate test} & Moderately accurate test & Highly accurate test & Perfect test \\ discriminating capacity of a test & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 6: AUC values [39]. \begin{table}
\begin{tabular}{c c} \hline \hline \multicolumn{1}{c}{**Advantages**} & **Limitations** \\ \hline DSS tool for diabetes prediction ready to use & Accurate training dataset \\ \hline Multi attribute analysis & Redundancy of data processing (correlated attributes) \\ \hline Reading procedure of outputs results & Presence of positive false and negative false due to wrong measurements \\ \hline Choose of the best model according to simultaneous & Finding a true compromise of efficiency parameter values \\ analyses (accuracy, loss, and AUC) & values \\ \hline Network having a memory used for the data & It is necessary to acquire a correct temporal data \\ processing & sequence \\ \hline Powerful approach if compared with ANN MLP & High computational cost \\ method & & \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Limitations and advantages of the proposed study. In order to test the LSTM-AR- algorithm on a time series dataset has been considered the sequential dataset of reference [40] (9086 time series data generated by 70 patients). This dataset is suitable for many architectures related to homecare smart assistance platforms. By observing the results of Table 8, it is clear that LSTM and LSTM-AR- approaches are characterized by the same performances. In particular LSTM and the LSTM-AR- exhibit a percentage improvement of Accuracy and Loss of 4% if compared with MLP results. In this case, the artificial records (454,300 artificial records) have been created by considering the sequential dataset by extracting sub- data set sequences with traditional sliding window approach. The MLP network is optimized for the new performed test (1 hidden layer enabling 30 neurons). Appendix C indicates the adopted MLP network. The adopted LSTM is the recurrent neural network--RNN--described in Appendix A (where sequential datasets will not be considered in structure reshaping).