## 4 Hybrid Prediction Model
### Outlier Detection Based on DBSCAN
```
Input: dataset \(D\), ensemble size \(T\), subspace dimension \(d\) Output: average of prediction from tree models for\(t=1\) to \(T\)do  build a bootstrap sample \(D_{t}\) from \(D\)  select \(d\) features randomly and reduce dimensionality of \(D_{t}\) accordingly  train a tree model \(M_{t}\) on \(D_{t}\)  split on the best feature in \(d\)  let the \(M_{t}\) growing without pruning end
```

**Algorithm 2**Pseudocode for Random Forest

The RFs overcome several problems with decision trees, such as reduction in overfitting and generate low variance. In this study, the outlier data from diabetes and hypertension are removed by DBSCAN-based outlier detection, and the SMOTE is utilized to balance the dataset. Finally, RF is utilized to learn from the training set, and the result of prediction is then compared with the testing set in order to obtain the model accuracy. A single output prediction has four different potential outcomes, as depicted in Table 6. The true positive (TP) and true negative (TN) are correct classifications. False positive (FP) occurs when the output is incorrectly predicted as yes (positive) when it is actually no (negative), while false negative (FN) occurs when the output is incorrectly predicted as no (negative) when it is actually yes (positive). For datasets I and III, the patients that are diagnosed with diabetes are defined as \"Yes\" class, while for dataset II, the \"Yes\" class reveal the patients who diagnosed with hypertension. In order to train and test the entire classification model, 10 fold cross validation was used. The final performance measure will be the average of all test performances of all folds. The application of classification models for all dataset is performed by Weka Software 3.6.15 [60]. The performance metrics of the classification model were calculated based on precision, recall, specificity, F1 score, and accuracy, and they are exhibited in Table 7. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{
\begin{tabular}{c} **Percentage of SMOTE** \\ **Increase (\%)** \\ \end{tabular} } & \multicolumn{2}{c}{**Class “Yes”**} & \multicolumn{2}{c}{**Class “No”**} & \multirow{2}{*}{**Total Instances**} \\ \cline{3-3} \cline{5-6}  & & **\# Instance** & & & **\# Instance** & **\%** \\ \hline \multirow{2}{*}{I} & 0 & 48 & 13.67 & 303 & 86.33 & 351 \\  & 500 & 288 & 48.73 & 303 & 51.27 & 591 \\ \hline \multirow{2}{*}{II} & 0 & 37 & 23.87 & 118 & 76.13 & 155 \\  & 200 & 111 & 48.47 & 118 & 51.53 & 229 \\ \hline \multirow{2}{*}{III} & 0 & 124 & 34.54 & 235 & 65.46 & 359 \\  & 100 & 248 & 51.35 & 235 & 48.65 & 483 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Number of instances increase by Synthetic Minority Over Sampling Technique (SMOTE). ## 5 Results and Discussion

This section is comprised of the performance evaluation of HPM, the impact of DBSCAN-based outlier detection and SMOTE, and managerial implication of the proposed model. The detail discussion of each part is presented one by one as subsection in detail. ### Performance Evaluation of Hybrid Prediction Model

The proposed HPM is compared with other classification algorithms as well as the results from previous studies. The HPM is applied for dataset I to foresee either the subject is diagnosed with diabetes or not with several input of risk factors. Table 8 showed the detail performance of HPM, as well as other conventional classification models. The result showed that the proposed HPM outperformed traditional models such as SVM, Multilayer Perceptron (MLP), Logistic regression, Naive Bayes, C4.5 and RF in term of precision, recall, F1 score, and accuracy. Furthermore, the proposed HPM is compared to a previous study conducted by [PERSON] et al. [14], and it shows better performance in model accuracy. The accuracy of proposed model achieved highest value as much as 92.55% when compared to the previous study (90.7%). [PERSON] et al. combined K-means and the logistic regression model to predict the existence of diabetes [14].