# Local Event Detection Scheme by Analyzing Relevant Documents in Social Networks
## 3 The Proposed Local Event Detection Scheme
### Graph Modeling  
We gathered keyword sets through the data collection. However, the keyword sets may contain a lot of unnecessary information unrelated to the event. Therefore, we generated a keyword graph that considers word importance and the number of mentions to refine the keyword sets that contain ambiguous information. This allowed us to easily figure out a keyword correlation and importance through the keyword graph, in which vertices and edges are assigned a weight value according to the word importance and the number of mentions. Figure 3 shows the overall procedure of selecting the \"key\" nodes that mean a delegated word in the keyword graph. In order to assign weights, we consider the number of co-occurrences and the number of mentions. After that, to calculate vertex scores, we considered users' explicit opinions in SNSs such as the number of likes and the number of retweets. We used geo-tag information for choosing regional nodes when the keyword graph is constructed. We embedded geographical data using the geographical dictionary if there are no geo-tag data available. We then constructed the keyword graph, where weight values are assigned to vertices and edges based on the number of co-occurrences and the number of mentions. Lastly, we performed an initial graph modeling. We assigned weight values to vertices and edges so that we can use the constructed keyword graph for detecting local events. Through this step, we can easily understand the keyword correlation and the importance according to the SNS characteristics, such as likes, retweets, and mentions. The frequency of co-occurrences represents the keyword correlation between two words. It is utilized for representing the edge weight. For example, \"cat\" and \"companion animal\" are very relevant, while \"cat\" and \"calendar\" are relatively not associated. Therefore, we should use the frequency of co-occurrences for analyzing this situation. The frequency of co-occurrences is changed according to a particular window size that a user has set up. If the window size is 1, the words that come before and after a specific word are included into the frequency of co-occurrences. The frequency of co-occurrences is normalized into the range [0, 1]. Min-max feature scaling of the edge weight can be formulated by Equation (1), where \(ew_{ij}\), \(ew_{max}\), and \(ew_{min}\) denote the frequency of the co-occurrence of vertices \(i\) and \(j\), i.e., the highest co-occurrence value and the lowest co-occurrence value, respectively. \[ew_{ij}=\frac{ew_{ij}-ew_{min}}{ew_{max}-ew_{min}} \tag{1}\]  
If we assign the same weight to all vertices that occur within the particular time window \(t\), it is hard to determine which keywords are important and are related to events. Therefore, we consider users' explicit opinions and interests to calculate vertex scores since they may contain significant words and meanings. The vertex weight can be formulated by Equation (2). The proposed scheme measures vertex weights by utilizing modified TF-IDF. The proposed scheme calculates the term frequency (TF) of keyword \(i\), much like the original method, and the inverse document frequency (IDF) is calculated by the ratio of the  
Figure 3: Overall procedure of selecting the key nodes. IDF of the current time window (\(t\)) to the IDF of the previous time window (\(t-1\)). Inverse document frequency is a key part of the term frequency-inverse document frequency (TF-IDF) calculation that determines the importance of keywords. The term frequency represents the number of times a term occurs in a document. The inverse document frequency is a measure of how much information the word provides, i.e., whether it is common or rare across all documents. TF-IDF is calculated by the multiplication of TF and IDF. A high weight in TF-IDF is reached by a high term frequency in a given document and a low document frequency of the term in the whole collection of documents; the weights hence tend to filter out common terms.