# Local Event Detection Scheme by Analyzing Relevant Documents in Social Networks
## 3 The Proposed Local Event Detection Scheme
### Graph Modeling
\[vw_{it}=tf_{it}*\frac{id_{fit}}{id_{i(t-1)}} \tag{2}\]  
We measured vertex scores by using vertex weights and users' explicit opinions, such as like and retweets. We can use explicit opinions as weights since posts that contain a lot of explicit opinions from other users may be more reliable and important. The vertex score can be formulated by Equation (3), where \(l_{it}\) and \(r_{it}\) denote the number of likes of keyword \(i\) and the number of retweets of the keyword within the particular time window \(t\), respectively. We applied the logarithm to the sum of likes and retweets for scaling. \[vs_{it}=vw_{it}*\log(l_{it}+r_{it}) \tag{3}\]  
In order to identify the key nodes, we measured using Text-Rank [32] scores on the weighted keyword graph. Text-Rank is frequently used for extracting primary keywords from the entire graph. We performed clustering based on the key nodes that were selected according to the Text-Rank algorithm. The Text-Rank score can be formulated by Equation (4), where \(v_{it}\), \(N_{i}\), and \(d\) denote a particular vertex \(i\) over time window \(t\), neighbors of vertex \(i\) in the weighted keyword graph, and the damping factor, respectively. We initialized the \(tr(v_{it})\) value with \(vs_{it}\), which is the vertex score calculated by Equation (3). The factor \(d\) that adjusts the random probability variable is usually set to 0.85 [33]. \[tr(v_{it})=(1-d)+d*\sum_{j\in N_{i}}\frac{ev_{ij}}{\sum_{k\in N_{j}}ev_{jk}}tr (v_{it}), \tag{4}\]  
The graph clustering based on the key nodes makes it easier to detect words associated with the event and improves the performance compared to using graph clustering based on entire keyword vertices. We chose the top-k key nodes according to the Text-Rank scores by the descending order. Geo-tags or regional nodes that are built by the geographical dictionary were also chosen as key nodes since they have an important role in detecting local events. Figure 4 shows the procedure of constructing the keyword graph and choosing key nodes. We constructed the initial keyword graph based on preprocessed data as shown in Figure 3(a). The locations \"Sokcho\" and \"Goseong\" are labeled as regional nodes. We calculated and assigned vertex and edge weights by using Equations (1) and (2). After that, we performed a Text-Rank analysis for the graph. First, we computed vertex scores by using Equation (3). Second, we assigned a vertex score to each vertex of the original graph. Finally, we determined the Text-Rank scores by using Equation (4). We sorted the Text-Rank scores by descending order and select top-k (\(k\) is 4 in this example) nodes (i.e., \"Forest Fire\", \"Sokcho\", \"Goseong\", and \"Danger\"), as shown in Figure 3(b). Finally, we obtained a graph with the key nodes as shown in Figure 3(c). A graph is generated based on the tweets that occur within a given unit of time window (1 h). To distinguish events, since graph clustering is performed on a key node basis through Text-Rank based key node selection, each cluster represents one event. Therefore, related words are clustered among themselves, allowing them to be distinguished among local events.