{"id":13719082,"url":"https://github.com/rs2416/Detecting_Social_Anxiety","last_synced_at":"2025-05-07T11:31:06.732Z","repository":{"id":211991023,"uuid":"286432131","full_name":"rs2416/Detecting_Social_Anxiety","owner":"rs2416","description":"This repository contains the full dataset and code needed to recreate the classification models and reproduce the results within this paper: https://formative.jmir.org/2021/10/e32656/","archived":false,"fork":false,"pushed_at":"2020-08-10T15:47:46.000Z","size":19909,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-04T01:11:50.604Z","etag":null,"topics":["jupyter-notebook","machine-learning","python","scikit-learn","social-anxiety"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rs2416.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-08-10T09:29:23.000Z","updated_at":"2023-01-29T16:09:44.000Z","dependencies_parsed_at":"2023-12-12T01:37:36.495Z","dependency_job_id":null,"html_url":"https://github.com/rs2416/Detecting_Social_Anxiety","commit_stats":null,"previous_names":["rs2416/detecting_social_anxiety"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs2416%2FDetecting_Social_Anxiety","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs2416%2FDetecting_Social_Anxiety/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs2416%2FDetecting_Social_Anxiety/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rs2416%2FDetecting_Social_Anxiety/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rs2416","download_url":"https://codeload.github.com/rs2416/Detecting_Social_Anxiety/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224592428,"owners_count":17337089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter-notebook","machine-learning","python","scikit-learn","social-anxiety"],"created_at":"2024-08-03T01:00:42.082Z","updated_at":"2024-11-14T08:31:18.347Z","avatar_url":"https://github.com/rs2416.png","language":"Jupyter Notebook","funding_links":[],"categories":["Anxiety"],"sub_categories":["Social Anxiety"],"readme":"\u003cp align=\"center\"\u003e\n\t\u003csub\u003eImperial College London\u003cbr\u003eDyson School of Design Engineering\u003c/sub\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003e\nDetecting Subclinical Social Anxiety Using Physiological Data from a Wrist-worn Wearable: A Small-Scale Feasibility Study \n\u003c/h1\u003e\n\n\n## 1. Overview\n\nThis study aimed to investigate whether subclinical social anxiety in young adults can be detected using physiological data obtained from wearable sensors, including Heart Rate (HR), Skin Temperature (ST) and Electrodermal Activity (EDA). This repository contains the full dataset and code needed to recreate the classification models and reproduce the results within the paper; as well as this the Python notebooks contain functions that enable further experimentation.\n\n#### 1.1. Nature of the dataset\n\nThe dataset consists of Heart Rate (HR) data, Skin Temperature (ST) data and Electrodermal Activity (EDA) data. This physiological data was collected using an E4 Empatica wearable device. \n\nThis data was collected during impromptu speech tasks involving young adults (N = 12) with self-reported subclinical social anxiety (measured by the widely used self-reported version of the Liebowitz Social Anxiety Scale, LSAS-SR). \n\n#### 1.2. Description of the ML experiments\n\nUsing the pre-processed data and following a supervised machine learning approach, various classification algorithms such as Support Vector Machine, Decision Tree, Random Forest and K-Nearest Neighbours (KNN) were used to develop models for three different contexts. Furthermore, the following experiments were carried out using datasets with all modalities combined, as well as datasets with only singular modalities.\n\n__Experiment (1)__ investigates whether models can be trained to classify between baseline and socially anxious states.\n\n__Experiment (2)__ investigates whether models can be trained to differentiate between baseline, anticipation anxiety and reactive anxiety states.\n\n__Experiment (3)__ investigates whether models can be trained to classify between social anxiety experienced by individuals with differing social anxiety severity.\n\n__Results \u0026 Evaluation__ The models were then evaluated using 10-fold cross validation as a performance index. Confusion matrices were also used to examine the classification accuracies per class.\n\n_Note:_ In order to reproduce the results in the report, please set the argument `repeat = True` in the functions within the `Supervised_Machine_Learning_Notebook.ipynb`.\n\n\n## 2. Repository structure\n\n#### 2.1. Data Preprocessing Folder\n\nThe repository contains Jupyter notebooks used to preprocess each participant's data in the `data_preprocessing` folder, within this folder there is a folder for each participant; each participant folder contains csv files of raw data and a notebook that preprocesses the data, called `Data_Preprocessing.ipynb`. Each participant folder also contains datasets for each experiment e.g `experiment_1.csv` that consist of previously preprocessed data so that the main notebook `Supervised_Machine_Learning_Notebook.ipynb` can execute without running each participant's preprocessing notebook.\n\n```\ndata_preprocessing/\n├── 1/                                  # folder for participant 1\n│   ├── Data_Preprocessing.ipynb        # preprocessing notebook\n│   ├── experiment_1.csv                # previously outputted preprocessed dataset for experiment (1)\n│   ├── experiment_2.csv                # previously outputted preprocessed dataset for experiment (2)\n│   ├── experiment_3.csv                # previously outputted preprocessed dataset for experiment (3)\n│   ├── HR.csv                          # HR dataset for participant 1\n│   ├── EDA.csv                         # EDA dataset for participant 1\n│   └── ST.csv                          # ST dataset for participant 1\n│\n├── 2/ ...                              # folder for participant 2\n```\n\n#### 2.2. Supervised ML (Data Processing) Folder\n\nThe repository contains a main Jupyter notebook called `Supervised_Machine_Learning_Notebook.ipynb` used for executing the three different supervised ML experiments. The notebook is in the `data_processing` folder. The folder also contains datasets for each ML experiment e.g. `experiment_1_randomised_data.csv`, these datasets consist of participants' preprocessed data that have been previously randomised. These datasets are used when an individual desires to reproduce the models and results from the report, this can be intiated when the argument `repeat = True` in any of the functions within `Supervised_Machine_Learning_Notebook.ipynb`; this was done because an actively randomised dataset may result in slightly differing results, compared to reusing the exact dataset used to create the results.\n```\ndata_processing/                                  \n├── Supervised_Machine_Learning_Notebook.ipynb      # supervised ML notebook\n├── experiment_1_randomised_data.csv                # previously randomised dataset for experiment (1)\n├── experiment_2_randomised_data.csv                # previously randomised dataset for experiment (2)\n└── experiment_3_randomised_data.csv                # previously randomised dataset for experiment (3)   \n```\n\n## 3. Instructions\n\nYou can view the notebooks with their outputs in this Github without running the notebooks. However, if you would like to run the notebooks firsthand, you must first download a zip file of this repository, then you must download [Anaconda Navigator](https://docs.anaconda.com/anaconda/install/). Following the download, you must launch Anaconda Navigator and click 'Jupyter Notebook'. Once Jupyter Notebook is launched, navigate to where the extracted zip folder is and open a notebook of your choice. You must then download each dependency (see below). After downloading the dependencies you should be able to run any of the notebooks.\n\n#### Dependencies: \nThe notebooks utilise NumPy, Matplotlib, Seaborn, Scikit-learn and Pandas dependencies, therefore they must be downloaded before using the notebooks. _Note:_ Matplotlib version 3.1.0 was installed as there is a bug in the latest version that affects the rendering of seaborn plots\n\n```\n pip install numpy\n pip install matplotlib==3.1.0\n pip install seaborn\n pip install scikit-learn\n pip install pandas\n```\n## 4. References\n\nThis project was powered by:\n\n- [Scikit Learn](https://scikit-learn.org/stable/)\n- [Matplotlib](https://matplotlib.org/)\n- [Pandas](https://pandas.pydata.org/)\n- [NumPy](https://numpy.org/)\n- [Seaborn](https://seaborn.pydata.org/)\n\n## 5. Quick Links \n\n\u003cp align=\"left\"\u003e\n\t\u003ca href=\"https://github.com/rs2416/Detecting_Social_Anxiety/blob/master/data_processing/Supervised_Machine_Learning_Notebook.ipynb\"\u003eSupervised ML notebook\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"left\"\u003e\n\t\u003ca href=\"https://github.com/rs2416/Detecting_Social_Anxiety/blob/master/data_preprocessing/1/Data_Preprocessing_Notebook.ipynb\" target=\"_blank\"\u003eAn example of a preprocessing notebook\u003c/a\u003e\n\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frs2416%2FDetecting_Social_Anxiety","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frs2416%2FDetecting_Social_Anxiety","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frs2416%2FDetecting_Social_Anxiety/lists"}