Project Goal

The goal of this experiment was to use machine learning models to investigate the effect of ambient temperature on cognitive performance. Machine learning models and classification techniques were used on data collected in different environments from subjects during their completion of the Stroop test. The Stroop test is regarded as a valid way to assess cognitive flexibility, attention capacity and mental processing speed, all of which fall in line with our overarching goal. By analyzing the data captured, the effect of ambient temperature will be captured in the EEG.

Untitled

Summary

This project aimed to investigate the potential impact of ambient temperature on cognitive performance, with implications for workplaces, educational environments, and geriatric care. The hypothesis suggested that temperatures below a comfortable indoor range (21-22 degrees Celsius) could negatively affect cognitive performance. The study utilized a Muse 2 electroencephalogram (EEG) to measure the brain's electric response to thermal stimuli. The results confirmed the hypothesis, revealing a significant relationship between temperature and cognitive performance, particularly in the Stroop test. The findings extended beyond the initial hypothesis, establishing a positive correlation between temperature and overall cognitive function. Causality was supported by demonstrating a low likelihood of similarities between test cases, underscoring the significance of temperature in influencing cognitive capabilities

Data Collection

Stroop Test

The Stroop Test is a well-established cognitive challenge that interrogates the cognitive control mechanisms of the human brain. It is an empirical measure of the executive function that assesses the ability to override automatic cognitive processes. The test's design capitalizes on the natural propensity to read words more easily than naming colors, presenting a conflict that requires cognitive control to resolve. The Stroop Test's sensitivity to cognitive load makes it an excellent proxy for studying how environmental factors, such as temperature, modulate cognitive flexibility and processing speed.

Untitled

A (left) Congruent Stroop test. B. (right) Incongruent  Stroop test

Procedure

Data collection was done in a “Cold” and “Normal” environment. Normal was assigned to be ambient room temperature (~20° C). Whereas cold was established to be a bench outside during early November (~8° C). For each one of these environments a timed congruent sample was taken as a base line, followed by a timed incongruent sample. To remove as much variation as possible in the collection process, subjects were asked to keep their attire the same between test. If a subject was wearing a T-shirt inside while recording their Normal environment sample, they were asked to not put on their coat while the Cold environment data was recorded. To remove any bias caused by the order in which they do the test, half the volunteers were recorded in “Normal” condition, and half at “Cold”. Given that the test only lasts two minutes there was minimal risk of temperature related health complications and there was ample amount of hot cocoa mix and tea on standby if needed.

Data Processing

After the data collection process, the data was cleaned from incorrect information caused by faulty connections between the subjects’ skin and the sensors. The different datasets created by cleaning the data differently were tested in a simple ANN model to find the best results. After the best cleaned dataset was selected, several ways to conduct the FFT were tested using a similar ANN model. First, the FFT was performed on entire test recordings, which could last over 20 seconds. Then, the FFT was tested on 10- and 20-second timesteps. Finally, the FFT was performed on raw data with eight-second windows, which yielded the best results. Several datasets based on the best cleaned dataset were tested in this process.

Through more testing, it was established that squaring the results of the eight-second window FFT gave the best visually meaningful results. With this data, averaging was performed to find relationships between temperature and performance, and the positive correlation between the two was observed, as hypothesized. This data was fed into the models - the Decision Tree, Random Forest, XGBoost, Naive Bayes, Logistic Regression, ANN, and KNN models - and the XGBoost and Random Forest models gave the best accuracy of 88.24%. Principal Component Analysis was used to reduce the dimension of the rather large dataset, but it ultimately yielded worse results than the large dataset.

Untitled