Pattern learning in smart homes and offices using motion sensor and mind wave data : unsupervised approaches