Skip to content

Latest commit

 

History

History
87 lines (68 loc) · 2.76 KB

README.md

File metadata and controls

87 lines (68 loc) · 2.76 KB

Deep Depression Detector

Deep learning model of depression detection from activity sensor data

Same sample activity data waves and their corresponding outputs

Input activity level data Output
{
  'prediction': 'depressed', 
  'confidence': 0.9602384
}
{
  'prediction': 'nondepressed', 
  'confidence': 0.97963333
}

Instillation

git clone https://github.com/liang6261515/deep_depression_detector.git
cd deep_depression_detector
pip3 install -r requirements.txt

download my deep depression detection model file from https://drive.google.com/file/d/1mpNJOdKB9JWFfjzqnX0zTwi_-cYh-XS3/view?usp=sharing

Usage

download the sample activity level data from https://datasets.simula.no/depresjon/

wget https://datasets.simula.no/depresjon/data/depresjon-dataset.zip
unzip depresjon-dataset.zip

after unzip if you will see folders and activity data csv file

in this data set, each person's activity level is stored in a csv file. Given the csv file path, the program will read the data and do the preditction. The output is a prediction with a confidence score

>>> from jessica_deep_depression_detector import deep_depression_detector
>>> 
>>> deep_depression_detector('data/control/control_2.csv')
{'prediction': 'nondepressed', 'confidence': 0.97963333}
>>> 
>>> deep_depression_detector('data/condition/condition_11.csv')
{'prediction': 'depressed', 'confidence': 0.9602384}

Model Structure

This deep neural network model has an input layer, then two convolutional layers (sliding window of 30 minutes, sliding step 10 minutes), then one max-pooling layer (to pick up the most responsed outputs), then one convolutional layer, and a finally max-pooling layer. Finally a dense layer.

TODO

To prevent the over-fitting problem, introduce the drop-out layer and cross-validation for the trianing