Research Article

Learning Evolutionary Stages with Hidden Semi-Markov Model for Predicting Social Unrest Events

Algorithm 1

The algorithm of BoEAG feature construction.
Require: original event records , support threshold , and maximum subgraphs returned
 Ensure: BoEAG feature set
(1)/ The set of event association graphs /
(2)/ The set subgraphs /
(3)
(4): event records aggregated by day
(5)for in do/ All the event records at date t/
(6)/ All the event association graphs at date t/
(7)for in do
(8)if is not traversed then
(9) constructing the graph unit of event
(10)for in do
(11)If is not traversed then
(12) constructing the graph unit of event
(13)if and contain at least one identical participant then
(14) generating “relate_to” edge between and
(15)end if
(16)end for
(17)end for
(18)
(19)end for
(20)for in do
(21)SSIGRAM/ Mining frequent subgraphs using the SSIGRAM algorithm /
(22)
(23)end for
(24)Representing each subgraph in as its standard adjacency matrix (CAM) coding sequence (for details of standard adjacency matrix, please refer to [55]).
(25)/ Calculating feature set using formula (4) /
(26)Return