| Algorithm 2: Feature Extraction |
| Input: A{a1, a2…an}, a set of activity |
| SIA, a tuple of sensor importance |
| w, threshold |
| Output:Ar{a1,a2…an}, activities after feature extraction |
| 1. Ar←Ø; |
| 2. for each a in A: |
| 3. ns←Ø;//new sensor sequence |
| 4. for each s in a.sq: |
| 5. temp←getvalue(SIA,sq.s1,s)//Get the importance of s |
| 6. if temp > w and s does not repeat: |
| 7. ns←◡s |
| 8. end if |
| 9. end for |
| 10. Ar←◡{a.bt,a.et,ns} |
| 11. end for |
| 12. return Ar |