## 3 Methodology
### Unsupervised ML
#### 3.3.1 NLP Topic Modeling  
Two NLP topic modeling methods, the types of UML widely used to uncover latent themes in text data, are latent Dirichlet allocation (LDA) and non-negative matrix factorization (NMF). LDA is a probabilistic generative model that characterizes each document as a mixture of topics, and each topic is a distribution over words in the corpus [17]. Intuitively, a word frequency distribution defines each of a predetermined number of topics, and a probability distribution of these topics characterizes the topical essence of each document. Mathematically, LDA maximizes the joint probability  
\[P(W,Z,\theta,\phi)=\prod_{d=1}^{D}P(\theta_{d})\prod_{n=1}^{N_{d}}P(z_{d,n}| \theta_{d})P(w_{d,n}|z_{d,n},\phi) \tag{1}\]  
where \(W\) represents the words in the corpus, \(Z\) represents the topic assignments, \(\theta_{d}\) is the topic distribution for document \(d\), \(\phi\) is the word distribution for topics, \(w_{d,n}\) is the \(n\)th word in document \(d\), and \(z_{d,n}\) is the topic assignment for that word. The algorithm used Gibbs sampling to learn the parameters \(\theta\) and \(\phi\)[18]. NMF, on the other hand, is a deterministic method based on matrix factorization [19]. Given a document-term matrix \(\mathbf{X}\in\mathbb{R}^{m\times n}\), where \(m\) is the number of documents and \(n\) is the vocabulary size, NMF approximates \(\mathbf{X}\) as the product of two non-negative matrices  
\[\mathbf{X}\approx\mathbf{WH} \tag{2}\]  
where \(\mathbf{W}\in\mathbb{R}^{m\times k}\) represents the topic weights for each document, \(\mathbf{H}\in\mathbb{R}^{k\times n}\) represents the word weights for each topic, and \(k\) is the number of topics. The optimization objective is to minimize the Frobenius (\(F\)) norm  
\[\min_{\mathbf{W},\mathbf{H}}\lVert\mathbf{X}-\mathbf{WH}\rVert_{F}^{2} \tag{3}\]  
subject to the constraints that \(\mathbf{W}\geq 0\) and \(\mathbf{H}\geq 0\). This optimization utilized the method of coordinate descent, which is widely used for NMF [20]. The present research applied both LDA and NMF topic modeling methods to each of the five technology domains with the aim of separating relevant documents from irrelevant ones. The models automatically labeled the resulting topics as \"topic 0\" and \"topic 1\" to distinguish them. To evaluate the accuracy of these topic assignments, the workflow produced a confusion matrix using the labeled dataset, with relevant documents labeled as \"1\" and irrelevant documents labeled as \"0\". The confusion matrix served to assess the alignment between the predicted topic labels and the actual relevance labels. It summarized the counts of true positives (TP), which are relevant documents correctly assigned to the \"relevant\" topic, true negatives (TN), which are irrelevant documents correctly assigned to the \"irrelevant\" topic, false positives (FP), which are irrelevant documents incorrectly assigned to the \"relevant\" topic, and false negatives (FN), which are relevant documents incorrectly assigned to the \"irrelevant\" topic. To refine the performance evaluation, the workflow calculated additional metrics such as precision, recall, and F1-scores, based on the confusion matrix. These metrics provide deeper insights into a model's ability to correctly classify relevant and irrelevant documents. Precision measures the proportion of documents predicted as relevant (positive) that are relevant, where  
\[\text{Precision}=\frac{TP}{TP+FP}. \tag{4}\]  
High precision indicates low false positive rates, meaning the model is good at avoiding the misclassification of irrelevant documents as relevant. Recall, also known as sensitivityor true positive rate, measures the proportion of actual relevant documents that the model correctly identified, where  
\[\text{Recall}=\frac{TP}{TP+FN}. \tag{5}\]  
High recall indicates that the model captures most of the relevant documents but does not incur a penalty for incorrectly classifying irrelevant ones.