Giter Site home page Giter Site logo

lando-l / ocd-detection Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 1.0 1.9 MB

The aim of this project is to make the assessment and treatment of OCD more accessible and effective.

License: MIT License

Python 56.38% Jupyter Notebook 43.62%
ocd federated-learning personalization human-activity-recognition tensorflow tensorflow-federated-learning obsessive-compulsive

ocd-detection's Introduction

ocd-detection

Code for the paper "Sensor-Based Obsessive-Compulsive Disorder Detection With Personalised Federated Learning".

The mental illness Obsessive-Compulsive Disorder (OCD) is characterised by obsessive thoughts and compulsive actions. The latter can occur as repetitive activities to ensure that severe fears do not come true. A diagnosis of the disease is usually very late due to a lack of knowledge and shame of the patient. Nevertheless, early detection can significantly increase the success of therapy.With the development of new wearable sensors, it is possible to recognise human activities. Accordingly, wearables can also be used to identify recurring activities that indicate an OCD. Through this form of an automatic detection system, a diagnosis can be made earlier and thus therapy can be started sooner.Since compulsive behaviour is very individual and varies from patient to patient, this paper deals with personalised federated machine learning models. We first adapt the publicly available OPPORTUNITY dataset to simulate OCD behaviour. Secondly, we evaluate two existing personalised federated learning algorithms against baseline approaches. Finally, we propose a hybrid approach that merges the two evaluated algorithms and reaches a mean area under the precision-recall curve (AUPRC) of 0.954 across clients.

Training

  • Data Augmentation: Augmentation of the OPPORTUNITY Activity Recognition Dataset to fit the binary OCD detection task by inserting repetitions of activities.
python augment.py /path/to/input /path/to/output --num-repetitions=3 --include-original
  • Centralized Training: Training of a single model on the centralized data.
python train_centralized.py /path/to/data /path/to/checkpoints --epochs=50
  • Local Training: Training of one local model for each client, without knowledge sharing.
python train_localized.py /path/to/data /path/to/checkpoints --clients-per-round=4 --rounds=50
  • Federated Averaging: Training of a single shared model using Federated Averaging.
python train_federated_averaging.py /path/to/data /path/to/checkpoints --clients-per-round=4 --rounds=50
  • Federated Learning With Personalization Layers: Training of a shared model and personalized client models using Federated Learning with Personalization Layers.
python train_federated_personal_layers.py /path/to/data /path/to/checkpoints --clients-per-round=4 --rounds=50
  • Adaptive Personalized Federated Learning: Training of a shared model and personalized client models using Adaptive Personalized Federated Learning.
python train_federated_model_interpolation.py /path/to/data /path/to/checkpoints --clients-per-round=4 --rounds=50
  • Federated Learning With Layer Interpolation: Training of a shared model and personalized client models using Federated Learning with Layer Interpolation.
python train_federated_mixed.py /path/to/data /path/to/checkpoints --clients-per-round=4 --rounds=50

Reference

If you find the code useful for your research, please consider citing

@INPROCEEDINGS{9680007,
  author={Kirsten, Kristina and Pfitzner, Bjarne and Löper, Lando and Arnrich, Bert},
  booktitle={2021 20th IEEE International Conference on Machine Learning and Applications (ICMLA)}, 
  title={Sensor-Based Obsessive-Compulsive Disorder Detection With Personalised Federated Learning}, 
  year={2021},
  volume={},
  number={},
  pages={333-339},
  doi={10.1109/ICMLA52953.2021.00058}
}

ocd-detection's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

marceloneppel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.