# Design and Implementation of Health and Risk Level Assessment for Socially Disadvantaged Patients
## 3 Platform Design and Implementation
### Models and Parameters  
In this research, variational autoencoders (VAE), deep autoencoding Gaussian mixture model (DAGMM), and light gradient boosting machine (LGBM) algorithms were used to construct a depression detection model. Variational autoencoders (VAE) are a type of autoencoder whose encoding distribution is regularized during the training in order to ensure that its latent space has good properties, allowing us to generate some new data. Moreover, the term \"variational\" comes from the close relation there is between the regularization and the variational inference method in statistics. The deep autoencoding  
Figure 5: Application structure that runs on two layers: foreground application and background service.  
Gaussian mixture model (DAGMM) consists of two major components: a compression network and an estimation network. DAGMM works as follows: (1) the compression network performs dimensionality reduction for input samples using a deep autoencoder, prepares their low-dimensional representations from both the reduced space and the reconstruction error features, and feeds the representations to the subsequent estimation network; and (2) the estimation network takes the feed, and predicts the likelihood/energy in the framework of the Gaussian Mixture Model (GMM). Light gradient boosting machine (LGBM) is a gradient boosting framework that uses tree-based learning algorithms. It is designed to be distributed and efficient with the following advantages: faster training speed and higher efficiency; lower memory usage; better accuracy; supports parallel, distributed GPU learning; and capable of handling large-scale data.  
In order to properly configure the parameters of these classification models, hyperparameters were applied to each algorithm and are shown in Tables 1-3.  
In this research, we trained a depression detection model using depressed subject data to build an emergency detection model. As for the detection of emergency situations, the outliers among the depression detection results were judged as emergency situations. Interquartile Range (IQR), Isolation Forest, and Density-Based Spatial Clustering are the methods used for judging outliers. In this study, an IQR-based anomaly score was calculated to judge outliers based on the normality of the data. For the labeling of emergency situations, a model with an F1-Score of 0.8 or higher was used for the classification of depression, and if the anomaly score was in the 0.01% category, it was labeled as an emer  
\begin{table}
\begin{tabular}{l l} \hline
**Parameters** & **Configuration** \\ \hline hidden\_neurons & 4–512 (by power of 2) \\ \hline hidden\_activation & tanh, sigmoid \\ \hline output\_activation & X \\ \hline loss\_function & X \\ \hline learning\_rate & 0.01–0.1 \\ \hline optimizer & SGD \\ \hline epochs & 30–200 \\ \hline batch\_size & 8–1024 (by power of 2) \\ \hline dropout\_rate & 0.2–0.5 \\ \hline validation\_size & 0.1–0.2 \\ \hline contamination & Depending on data \\ \hline \end{tabular}
\end{table}
Table 1: Parameters for VAE.  
\begin{table}
\begin{tabular}{l l} \hline
**Parameters** & **Configuration** \\ \hline hidden\_neurons & 4–512 (by power of 2) \\ \hline n\_gmm & 1–21 \\ \hline dropout\_rate & 0.2–0.5 \\ \hline loss\_function & X \\ \hline epochs & 30–200 \\ \hline batch\_size & 8–1024 (by power of 2) \\ \hline validation\_size & 0.1–0.2 \\ \hline learning\_rate & 0.0001–0.1 \\ \hline \end{tabular}
\end{table}
Table 2: Parameters for DAGMM.  
gency situation. An anomaly score is a value that judges abnormality or normality, and the higher the number, the more critical the situation.