Adaptive sliding window based activity recognition for assisted livings