## 3 Methodology
### Decision Tree  
A tree-based categorization method like DTs was used to predict components from a group of independent variables [93]. Consumers' buying intention was considered the study's independent variable and the intended result of the DT. According to [PERSON] and [PERSON] [94], a DT comprises a parent node that branches out to the child or leaf nodes, followed by the root node for classification using the input data, which is the test attribute. Gini and Entropy are two indexes used to measure DT results. The DT model's Gini index, which measures the child nodes' impurity, was calculated using Equation (1). The homogeneity of the child nodes in the DT is maximized by the Gini index [93] and it is stated that the Gini impurity measures the frequency of any dataset element being incorrectly classified when randomly tagged. \[Gini(t)=1-\sum_{j}[p(j|t)]^{2} \tag{1}\]  
Additionally, Equation (2) was used to determine the Entropy index. The Entropy index was used to determine the ideal hierarchical DT structure, similarly to the Gini index. The outcome would show which input data could forecast human behavior [95]. The benefit of using a DT as an MLA tool is that no assumptions are required when data is fed into the machine [95]. \[Entropy(t)=-\sum_{j}p(j|t)logp(j|t) \tag{2}\]  
[PERSON] and [PERSON] [96] stated that DTs are classified tools under MLA. It classifies significant latent variables that result in a choice impacting the dependent variable by considering the relationships between variables (shown as tree branches). Furthermore, [PERSON] and [PERSON] [96] also stated that DTs are employed in human behavior to build a prediction model for every value a target variable takes into account. To develop a model for various classes (dependent factor), [PERSON] and [PERSON] [97] discussed how DTs as a classification tool might create a predictive model in many fields, including healthcare, human factors, manufacturing, and many more. Moreover, [PERSON] et al. [95] demonstrated how DTs might be utilized to categorize factors that influence human behavior. This has been considered as one of the powerful strategies that may be efficiently used for nonlinear \begin{table}
\begin{tabular}{c l l l l} \hline \hline
**Latent Variable** & **Code** & \multicolumn{1}{c}{**Construct**} & **Reference** \\ \hline \multirow{4}{*}{Attitude} & A1 & I think that buying self-defense tools is worth it & [89] \\  & A2 & I worry about the effects of not carrying a self-defense tool & \\  & A3 & I feel anxious whenever I hear news about threats in the streets & \\  & A4 & I think that buying self-defense tools is a responsibility & [90] \\ \hline \multirow{4}{*}{Perceived Safety} & PF1 & I believe that my risk in street crimes will lower when carrying a & \\  & PF2 & I feel confident to wander alone in the street with a weapon & \\  & PF3 & I think that I can completely avoid street crimes with a self-defense tool & [58] \\  & PF4 & I believe that if I avoid suspicious alleways, I will be safe & \\ \hline \multirow{4}{*}{Purchase Intention} & PI1 & I intent to buy self-defense tools & [88] \\  & PI2 & I intent to seek buyer reviews/experience about self-defense tools & [88] \\  & PI3 & I am more likely to buy self-defense tools because they are timely & [91] \\  & PI4 & I am more likely to purchase self-defense tools due to the current events & [91] \\ \hline \multirow{4}{*}{Buying Impulse} & BI1 & Buying a self-defense tool will benefit my peace of mind & [92] \\  & BI2 & I do not mind the price of self-defense tools & [92] \\ \cline{1-1}  & BI3 & The efficiency of the self-defense tools is critical for me & \\ \cline{1-1}  & BI4 & I suddenly want to purchase self-defense tools that I did not plan on & [92] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._datasets. Decision trees could be used because this study uses a nonlinear dataset to assess human characteristics and behavior.