This folder is made available as part of the following research paper published in 2023 AIAA Aviation and Aeronautics Forum and Exposition (AIAA AVIATION Forum).

Title: A Comprehensive Analysis of Machine Learning and Deep Learning Models for Identifying Pilots' Mental States from Imbalanced Physiological Data
Authors: Ibrahim M. Alreshidi, Satendra Yadav, Irene Moulitsas, and Karl W. Jenkins.

Abtract:
This study focuses on identifying pilots' mental states linked to attention-related human performance-limiting states (AHPLS) using a publicly released, imbalanced physiological dataset. The research integrates electroencephalography (EEG) with non-brain signals, such as electrocardiogram (ECG), galvanic skin response (GSR), and respiration, to create a deep learning architecture that combines one-dimensional Convolutional Neural Network (1D-CNN) and Long Short-Term Memory (LSTM) models. Addressing the data imbalance challenge, the study employs resampling techniques, specifically downsampling with cosine similarity and oversampling using Synthetic Minority Over-sampling Technique (SMOTE), to produce balanced datasets for enhanced model performance. An extensive evaluation of various machine learning and deep learning models, including XGBoost, AdaBoost, Random Forest (RF), Feed-Forward Neural Network (FFNN), standalone 1D-CNN, and standalone LSTM, is conducted to determine their efficacy in detecting pilots' mental states. The results contribute to the development of efficient mental state detection systems, highlighting the XGBoost algorithm and the proposed 1D-CNN+LSTM model as the most promising solutions for improving safety and performance in aviation and other industries where monitoring mental states is essential.

We have performed our experiments on an Intel(R) Core(TM) i7-10700 2.90 GHz CPU with 32 GBytes RAM PC. We have used Python within Jupyter Notebook to write the code for our experiments. Utilised libraires include Scikit-Learn, Tensorflow, and MNE-Python

## Contents of this repository
Data: 
This folder contains:
- A dataset called combined_df4, which contains the power spectral density features after employing SMOTE.
- A dataset called combined_df5, which contains the power spectral density features after employing SMOTE and cosine similarity.

Source code:
This folder contains:
- A jupyter notebook called AdaBoost.ipynb which was used to generate the results for the AdaBoost algorithm.
- A jupyter notebook called CNN.ipynb which was used to generate the results for the CNN algorithm.
- A jupyter notebook called CNN+LSTM.ipynb which was used to generate the results for the CNN+LSTMalgorithm.
- A jupyter notebook called LSTM.ipynb which was used to generate the results for the LSTMalgorithm.
- A jupyter notebook called FNN.ipynb which was used to generate the results for the FNN algorithm.
- A jupyter notebook called Random_Forest.ipynb which was used to generate the results for the Random Forest algorithm.
- A jupyter notebook called XGBoost.ipynb which was used to generate the results for the XGBoost algorithm.