Identifying the symptoms of the early stages of dementia is a difficult task, particularly for older adults living in residential care. Internet of Things (IoT) and smart environments can assist with the early detection of dementia, by nonintrusive monitoring of the daily activities of the older adults. In this work, we focus on the daily life activities of adults in a smart home setting to discover their potential cognitive anomalies using a public dataset. After analysing the dataset, extracting the features, and selecting distinctive features based on dynamic ranking, a classification model is built. We compare and contrast several machine learning approaches for developing a reliable and efficient model to identify the cognitive status of monitored adults. Using our predictive model and our approach of distinctive feature selection, we have achieved 90.74% accuracy in detecting the onset of dementia.