# Predictive Fraud Analysis Applying the Fraud Triangle Theory through Data Mining Techniques
## 4 Results and Discussion
### Probability Distribution Generation
#### 4.1.2 Application of LDA Model  
The number \(k\) of topics is an input parameter to obtain an LDA topic model. Determining the adequate value of \(k\) is critical for the model's performance. For our particular scenario (fraud detection using the fraud triangle theory), intuitively, the ideal number of topics embedded in the data set is 3, corresponding to the vertices of the fraud triangle (pressure, opportunity, and reasoning). However, from the coherence analysis described previously, 9 is the excellent value of \(k\). \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Models**} \\ \cline{2-4}  & **LSA** & **NMF** & **LDA** \\ \hline Coherence Values & 0.4735 & 0.9143 & 0.6164 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Highest values of coherence obtained from the 3 models. \begin{table}
\begin{tabular}{l l l l} \hline \hline  & \multicolumn{3}{c}{**LSA**} \\ \hline
**T1** & **T2** & **T3** & **T4** \\ \hline problem & debt & be & job \\ economic & public & scare & lose \\ debt & problem & job & be \\ social & economic & lose & scare \\ political & country & go & ill \\ face & private & know & would \\ solve & service & get & scared \\ country & include & care & want \\ serious & reduction & think & work \\ issue & stock & people & earning \\ people & total & deserve & get \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Collection of topics and the top 10 keywords of the corresponding topic represented by the LSA model. Such overlapping could also be analyzed through an intertopic distance map, e.g., that provided by the pyLDAvis Python library. pyLDAvis depicts an interactive, visual representation of an LDA model, through bubbles that represent the topics in a semantic topic space. Then, the closer the bubbles are to each other, the more semantic similarity they share. This map facilitates the understanding of the topic-term relationships in an adjusted LDA model and offers additional information about other perspectives on the applied model [76]. We tested the intertopic distance map in Figure 5 for different values of \(k\), and we found an evident overlapping of topics for \(k=9\). In contrast, for \(k=4\), this representation depicted in Figure 5b showed topics adequately separated from each other. These four topics would be in line with the categories associated with the three components of the fraud triangle plus a fourth topic grouping other words. To validate that \(k=4\) is the number of topics that best behaves according to the manual test described above, we use Algorithm 1 to adjust the hyperparameters (Dirichlet alpha and beta) of the LDA model. After testing different hyperparameters, we find that with the alpha and beta values of 0.91 and 0.31, respectively, \(k=4\) is obtained, which is the value for which the LDA model obtains the highest coherence of 0.5713. Once the LDA model is obtained from the data set, words are manually labeled with the four resulting topics, according to the context of fraud, such as pressure, opportunity, rationalization, or others. This categorization is graphically depicted in Table 5. Labeling topics makes it possible to interpret the corpus and identify the theme implicit in this data