# AWMC: Abnormal-Weather Monitoring and Curation Service Based on Dynamic Graph Embedding
## 3 Method
### Construction of Dynamic Graph  
Our idea was to discover the relationship among weather time series to detect abnormal weather conditions, and the graph structure was better than other data structures for modeling relationships between multiple items. Therefore, this study obtained the changing relationships among weather time series using a dynamic graph. In the graph, the vertex denotes a time series, and the edge represents the relationship among the time series. The weight of the edge is determined by causality and correlation between different time series. Causality is defined as the extent to which one series improves the prediction of another series and is expressed as follows.  
\[C(x,y)=\left\{\begin{array}{ll}1&if\ p\geq 0.05\\ 0&otherwise\end{array}\right. \tag{1}\]  
where \(x\) and \(y\) are two time series, \(C(x,y)\) indicates the causality between \(x\) and \(y\), and \(p\) is the probability that the two time series are not causally related.  
The Granger causality test [30] was used to calculate the short-run causality between two time series, \(x\) and \(y\). The Granger causality test first used the value of the previous time  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**System** & **Function** & **Method** & **Feature Extraction** & **Database** \\ \hline [PERSON] et al. [12] & Weather data visualization & ✗ & ✗ & PostgresSQL, Hadoop \\ [PERSON] et al. [13] & Fire weather index interpolation & Interpolation method & ✗ & ✗ \\ [PERSON] et al. [14] & Weather forecasting & ✗ & ✗ & ✗ \\ [PERSON] et al. [15] & Weather monitoring & Zigbee & ✗ & ✗ \\ [PERSON] et al. [16] & Weather forecasting & Support vector machine & ✗ & MySQL \\ [PERSON] et al. [17] & Weather forecasting & ✗ & ✗ & MySQL \\ [PERSON] et al. [18] & Weather forecasting & Analogue complexing & ✗ & ✗ \\ [PERSON] et al. [19] & Temperature and rainfall prediction & Neural network & ✗ & ✗ \\ [PERSON] et al. [20] & Weather forecasting & K-nearest Neighbors & ✗ & IBM Cloudant \\ [PERSON] et al. [21] & Weather forecasting & MapReduce algorithm & ✗ & ✗ \\ [PERSON] et al. [22] & Low Cost Weather Monitoring & ✗ & ✗ & MySQL \\ [PERSON] et al. [23] & Real-time weather monitoring & ✗ & ✗ & ✗ \\ [PERSON] et al. [24] & Weather data interpolation & Linear interpolation & ✗ & MySQL \\ [PERSON] et al. [25] & Wildland fire monitoring & ✗ & ✗ & ✗ \\ [PERSON] et al. [26] & Historical weather data visualization & Online analytical & ✗ & MySQL \\ [PERSON] et al. [26] & Automatic weather information & ✗ & ✗ & MySQL \\ [PERSON] et al. [27] & retrieval & & ✗ & MySQL \\ [PERSON] et al. [28] & Real-time flood threat estimation & Subsurface hydrologic & ✗ & MS-SQL \\ [PERSON] et al. [29] & Weather monitoring & ID3 algorithm & ✗ & MySQL \\ AWMC & Abnormal-weather monitoring and & Dynamic graph embedding & Relational feature & MySQL \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of existing weather systems and AWMC (✗: the system does not use the method, feature extraction, or database.)interval of \(x\) to predict the current \(x\). Then, it used values of the previous time interval of \(x\) and \(y\) to predict the value of the current \(x\). Lastly, we determined whether the \(y\) time series helped in predicting the \(x\) time series by comparing it with two predict results. In addition, \(p\) is the probability that the two time series are not causally related. If \(p\) is greater than 0.5, the two time series are not causally related.  
[PERSON]'s correlation coefficient (PCC) [31] was used to express the correlation between time series. Additionally, the weight of the edge was calculated with causality and PCC, as follows.  
\[R(x,y)=\left\{\begin{array}{rl}1&\text{if }C(x,y)=0\\ C(x,y)-|PCC|&\text{otherwise}\end{array}\right. \tag{2}\]  
where \(R(x,y)\) indicates