Ambient Activity Recognition in Smart Environments for Cognitive Assistance