|
Algorithm 1: Online Algorithm for SimNest |
|
|
Input: Data matrix X = X1 ∪ X2, Twitter data stream C, contact network G. |
|
Output: the population’s predicted health states Ƶ. |
1 |
Set the learning rate η = 0.5. Initialize weight matrix W as matrix of random values between -1 and 1; |
2 |
repeat |
3 |
Update unlabeled data set X2 by Twitter data stream; |
4 |
repeat
|
5 |
Randomly select a labeled sample (Xu,t, Yu,t); |
6 |
; |
7 |
Randomly select an unlabeled sample Xu; |
8 |
; |
9 |
Randomly select an unlabeled sample Xυ; |
10 |
for i ← 1 to
T
do
|
11 |
|
12 |
end
|
13 |
Randomly select a user u from a location l ∈ L; |
14 |
; |
15 |
; |
16 |
; |
17 |
until
converge; |
18 |
; |
19 |
|
20 |
until
the end of data stream; |
|