# Quantification and Analysis of Group Sentiment in Electromagnetic Radiation Public Opinion Events
## 3 EMR Public Sentiment Analysis System Design
### Public Sentiment Analysis of EMR
#### 3.2.4 Domain-Specific Public Sentiment Analysis  
Given the high risk and sensitivity of EMR public sentiment events, this study has designed a hot-topic mining module for in-depth analysis. Hot topic mining identifies the social issues that concern the public the most from a vast amount of text. Hot topics differ from ordinary topics in that they are events and subjects widely discussed by netizens within a certain period and which have received a high degree of attention. Mining hot topics related to EMR events helps to analyze the causes of emotional transmission, thereby formulating effective and precise public sentiment intervention strategies. Additionally, the system includes source tracing analysis, which analyzes the publication, dissemination, and sources of negative emotional information to quickly and accurately identify the source of emotional transmission. Analyzing the source information helps formulate effective countermeasures to cut off the spread of negative emotions.  
There are two mainstream methods for hot topic mining algorithms: one involves obtaining hot words or topics through word frequency and topic models and then clustering them according to the hot words or topics. If a topic model-based method is chosen, many studies would use LDA or BTM topic models. The LDA topic model first generates a topic distribution from the Dirichlet distribution and then generates a word distribution using different parameter Dirichlet distributions. Multiple words constitute a document. Since the Dirichlet distribution is random, if the same data are trained multiple times, the results obtained each time are different. Such errors can accumulate, causing subsequent errors to increase. Therefore, this study chooses to complete hot topic mining based on the word frequency method.  
Based on the characteristics of high attention and discussion rates among netizens in online hot events, we designed a method of identifying hot words that appear frequently in published posts. The specific approach involves counting word frequency in the collected text dataset, and if a word's frequency is high, then the post containing this hot word is likely to mention a hot event. The following is the calculation process for hot words: (1) Tokenize the text of all posts and remove stop words. (2) Calculate the frequency ratio. (3) Set a threshold to filter out words with low frequency and generate a document of hot words. After that, cluster the posts containing these hot words, categorizing repetitive discussions of the same hot event and different hot events. The specific approach involves generating feature vectors for all posts, construct a bag-of-words space, and using K-means for clustering, merging posts that discuss the same hot event. After clustering, we can obtain several clusters, each representinga topic category. By counting the number of posts included in each category, we can determine the largest topic cluster. The largest cluster represents a high number of posts published on this topic, with many people discussing it, indicating that the topic may be a hot topic. The specific implementation process is as follows: (1) Construct a feature vector for each post, with each element of the vector representing the number of times each hot word appears. (2) Use TF-IDF to transform the number of times a word appears into weights, resulting in a matrix where columns represent a set of hot words, each row represents a post, and the row vector represents the weight of the hot word in the post. (3) Use the K-means method for clustering. (4) Classify the posts according to the clustering results.