Skip to content
@harmonydata

Harmony

Harmonising mental health data with natural language processing

The Harmony Project logo

🌐 harmonydata.ac.uk Harmony | LinkedIn Harmony | X Harmony | Instagram Harmony | Facebook Harmony | YouTube

PyPI package PyPi downloads forks docker r

You can also join our Discord server!

What does Harmony do?

  • Psychologists and social scientists often have to match items in different questionnaires, such as "I often feel anxious" and "Feeling nervous, anxious or afraid".
  • This is called harmonisation.
  • Harmonisation is a time consuming and subjective process.
  • Going through long PDFs of questionnaires and putting the questions into Excel is no fun.
  • Enter Harmony, a tool that uses natural language processing and generative AI models to help researchers harmonise questionnaire items, even in different languages.

Quick start with the code

💁You can run the walkthrough Python notebook in Google Colab with a single click: Open In Colab

🇷You can also download an R markdown notebook to run in R Studio: Open In R Studio

🇷You can run the walkthrough R notebook in Google Colab with a single click: Open In Colab

The Harmony Project

Harmony is a tool using AI which allows you to compare items from questionnaires and identify similar content. You can try Harmony at https://app.harmonydata.ac.uk and you can read our blog at https://harmonydata.ac.uk/blog/.

The source code for Harmony is on Github at https://github.com/harmonydata/harmony.

Here's a walkthrough video on how you can use Harmony online at harmonydata.ac.uk. Click to view:

Harmonising questionnaires

Looking for source code?

Harmony team internal

Information about Harmony's server setup and deployment is in the private repo harmony_deployment_ulster_private.

💚 Harmonising Mental Health Data

The Harmony project is a data harmonisation project that uses Natural Language Processing to help researchers make better use of existing data from different studies by supporting them with the harmonisation of various measures and items used in different studies.

‎😃💁Who worked on Harmony?

Harmony is a collaboration project between Ulster University, University College London, the Universidade Federal de Santa Maria, and Fast Data Science. Harmony has been funded by Wellcome as part of the Wellcome Data Prize in Mental Health and by Economic and Social Research Council (ESRC).

The core team at Harmony is made up of:

✉️Who to contact about Harmony?

You can contact us at https://harmonydata.ac.uk/contact/.

📜How do I cite Harmony?

McElroy, E., Moltrecht, B., Ploubidis, G.B., Scopel Hoffman, M., Wood, T.A., Harmony [Computer software], Version 1.0, accessed at https://app.harmonydata.ac.uk. Ulster University (2022)

🔢Does Harmony store my data?

If you upload a questionnaire or instrument, Harmony does not store or save it. You can read more on our Privacy Policy page.

⚙️How does Harmony work?

Harmony passes the text of each questionnaire item through a neural network called Sentence-BERT, in order to convert it into a vector. The similarity of two texts is then measured as the similarity between their vectors. Two identical texts have a similarity of 100% while two completely different texts have a similarity of 0%. You can read more in this technical blog post and you can even download and run Harmony’s source code.

🎯How reliable is Harmony?

Harmony was able to reconstruct the matches of the questionnaire harmonisation tool developed by McElroy et al in 2020 with the following AUC scores: childhood 81%, adulthood 77%. Harmony was able to match the questions of the English and Portuguese GAD-7 instruments with AUC 100%. You can read more in this blog post.

🧮What do the numbers mean?

The numbers are the cosine similarity of document vectors. The cosine similarity of two vectors can range from -1 to 1 based on the angle between the two vectors being compared. We have converted these to percentages. We have also used a preprocessing stage to convert positive sentences to negative and vice-versa (e.g. I feel anxious -> I do not feel anxious). If the match between two sentences improves once this preprocessing has been applied, then the items are assigned a negative similarity.

📊 Does Harmony give p-values?

At this time Harmony does not give p-values. But you can interpret the percentage matches like correlation coefficients. In future we hope to provide more statistical data to Harmony’s users.

🧑 Who developed the Python code of Harmony?

📜 How do I cite Harmony?

You can cite our validation paper:

McElroy, Wood, Bond, Mulvenna, Shevlin, Ploubidis, Scopel Hoffmann, Moltrecht, Using natural language processing to facilitate the harmonisation of mental health questionnaires: a validation study using real-world data. BMC Psychiatry 24, 530 (2024), https://doi.org/10.1186/s12888-024-05954-2

A BibTeX entry for LaTeX users is

{{< rawhtml >}}

@article{mcelroy2024using,
  title={Using natural language processing to facilitate the harmonisation of mental health questionnaires: a validation study using real-world data},
  author={McElroy, Eoin and Wood, Thomas and Bond, Raymond and Mulvenna, Maurice and Shevlin, Mark and Ploubidis, George B and Hoffmann, Mauricio Scopel and Moltrecht, Bettina},
  journal={BMC psychiatry},
  volume={24},
  number={1},
  pages={530},
  year={2024},
  publisher={Springer}
}

{{< /rawhtml >}}

Popular repositories Loading

  1. harmony harmony Public

    The Harmony Python library: a research tool for psychologists to harmonise data and questionnaire items. Open source.

    Jupyter Notebook 13 23

  2. hackathon hackathon Public

    3 4

  3. harmony_original harmony_original Public

    The Harmony project

    Jupyter Notebook 1 1

  4. harmonyapi harmonyapi Public

    This is the source code for the Harmony project REST API

    Python 1 8

  5. harmony_r harmony_r Public

    R library for Harmony

    HTML 1 2

  6. harmony_examples harmony_examples Public

    Example Jupyter notebook and R scripts using Harmony in real research problems

    HTML 1 2

Repositories

Showing 10 of 16 repositories
  • harmonydata.github.io Public

    Blog for NLP data harmonisation project Harmony, open source solution using Python for psychologists

    harmonydata/harmonydata.github.io’s past year of commit activity
    HTML 0 1 0 0 Updated Dec 20, 2024
  • harmony_examples Public

    Example Jupyter notebook and R scripts using Harmony in real research problems

    harmonydata/harmony_examples’s past year of commit activity
    HTML 1 MIT 2 0 0 Updated Dec 19, 2024
  • harmony Public

    The Harmony Python library: a research tool for psychologists to harmonise data and questionnaire items. Open source.

    harmonydata/harmony’s past year of commit activity
    Jupyter Notebook 13 MIT 23 21 (1 issue needs help) 2 Updated Dec 19, 2024
  • harmonyapi Public

    This is the source code for the Harmony project REST API

    harmonydata/harmonyapi’s past year of commit activity
    Python 1 8 4 0 Updated Dec 19, 2024
  • app Public

    Harmony front end

    harmonydata/app’s past year of commit activity
    JavaScript 0 MIT 6 5 (1 issue needs help) 4 Updated Dec 13, 2024
  • .github Public

    Introduction to the Harmony project

    harmonydata/.github’s past year of commit activity
    0 0 0 0 Updated Dec 5, 2024
  • hackathon Public
    harmonydata/hackathon’s past year of commit activity
    3 MIT 4 0 0 Updated Dec 1, 2024
  • harmony_r Public

    R library for Harmony

    harmonydata/harmony_r’s past year of commit activity
    HTML 1 2 6 (3 issues need help) 0 Updated Oct 29, 2024
  • harmonydata/pdf-questionnaire-extraction’s past year of commit activity
    Python 0 MIT 0 3 0 Updated Jul 19, 2024
  • harmonybot Public

    Harmony bot

    harmonydata/harmonybot’s past year of commit activity
    0 MIT 0 0 0 Updated Jun 5, 2024

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…