Input: Λ = Training sequence of sensor event data labeled with activity segments, L = Loss function |
Output: Π, the recurrent predictor |
1: |
for each activity predictor j = 1 to K
do
|
2: |
Initialize the set of regression examples 𝒟j = ∅ |
3: |
end for |
4: |
for each time step i = 1 to N
do
|
5: |
for each activity predictor j = 1 to K
do
|
6: |
Compute Ψlocal(i) = Φ(λi) |
7: |
Compute Ψcontext(i, j) |
8: |
Joint features Ψij = Ψlocal(i) ⊕ Ψcontext(i, j) |
9: |
Compute best output
using L
|
10: |
Add regression example (Ψij,
) to 𝒟j
|
11: |
end for
|
12: |
end for |
13: |
for each activity predictor j = 1 to K
do
|
14: |
Πj =Regression-Learner(𝒟j) |
15: |
end for |
16: |
return learned predictor Π = (Π1,Π2, ⋯,ΠK) |