# Earthquake Shake Detecting by Data Mining from Social Network Platforms
## 2 Methodology  
In this investigation, the author selected the earthquake events with seismic magnitude greater than or equal to 5.0 from 2013-2016 because the data posted for events with magnitude less than 5.0 were very few. To obtain posts on the earthquake event, we apply the semantic analysis of a blog post. The author captures the useful posts by using the key semantic words and requirements that include the following:  
**Term 1:** The author identifies the keyword of the location in the posts to group them into the same region because there is no location information for users in the PTT BBS. This step will classify the message into different regions using the location provided in the posts. The data will not be adopted without location information. **Term 2:** To derive the seismic shaking scale, the author applies the semantic analysis of a post to identify the keyword of the disaster information, such as the shaking of the body, feeling or descriptions of damage during the earthquake. In this study, the author refers to the description of seismic intensity levels and the corresponding feeling of the earthquake as reported by the CWB (Table 1) to be the keywords for semantic analysis. Then, the author adds some keywords that do not include the present scale table into the seismic scale table of feeling to improve the classification of seismic intensity. The earthquake intensity table is categorized into eight levels from 0-7, and the classification is made according to the greatest velocity on the surface calculated from the seismometer record around Taiwan. The CWB depends on this value for describing the corresponding emotional state and damaged scale. Figure 1: A real tweet example on the PTT Gossiping board. The first step is to check posts from the social media network that satisfy the keywords of the two terms simultaneously. For instance, in tags 8 and 13 in Figure 1, it is hard to recognize the location and tags 11-12 only tag the location and without text for sentiment. These data should be excluded. The second step is to arrange the collected posts into different regions by the keywords of the regions and then derive the possible seismic intensity by using the decision tree model based on the semantic analysis. The decision tree is a machine-learning algorithm used for classification and prediction in the form of a tree structure. [PERSON] [24] proposed the ID3 algorithm to use the information gain method to construct a decision tree by the smallest subsets. It is a top-down, greedy search through the space of possible branches with no backtracking algorithm. The method assumes that there are N training samples and calculates the information gain for each attribute and the largest value, which corresponds to the best predictor, is the root node. Then the samples are separated into several subsets (or leaf nodes) and the most effective attribute separating into several sets from the subsets is selected by the information gain [25]. The process continues until all samples are classified. In this study, the author derived the seismic intensity by analyzing data collected from the social media tweets in the decision tree ID3 model. Thus, this study defined the following set of variable places, \(\text{Area}\in\left\{\text{A}^{1},\text{ }\text{A}^{2},\ldots,\text{A}^{n}\right\}\), and the set contains categories of earthquake intensity. In this investigation, it was concluded that the semantic word of emotion or the disaster information from posts can be categorized into four classifications: body-feeling, sleep-affecting, furniture-toppling, and the damage situation of the house. According to these four classifications, the structure of the decision tree model is constructed by using the entropy value (\(S\)) and the information gain (Equations (1) and (2)).