harmonydata / app

Harmony front end
https://harmonydata.ac.uk/app/
MIT License
0 stars 4 forks source link

Don't show themes in catalogue if no clear link between items and catalogue theme #13

Closed bmoltrecht closed 6 months ago

bmoltrecht commented 8 months ago

Don't show themes from catalogue of MH measures if no clear link between items and catalogue themes. See image

Harmony link to catalogue_error

ronnyTodgers commented 8 months ago

@woodthom2 this will require the topics_auto field to carry additional information relating to the strength of the relationship which has provided that topic suggestion.

woodthom2 commented 8 months ago

@ronnyTodgers Would this be an acceptable solution? To add a new property topics_strengths to the Question object? I have kind of implemented it in branch: https://github.com/harmonydata/harmony/tree/add_topic_strengths

{
  "question_no": null,
  "question_intro": null,
  "question_text": "Feeling nervous, anxious, or on edge",
  "options": [],
  "source_page": 0,
  "instrument_id": null,
  "instrument_name": null,
  "topics_auto": [
    "alcohol use"
  ],
  "topics_strengths": {
    "alcohol use": 0.3066757541449539
  },
  "nearest_match_from_mhc_auto": {
    "question_no": null,
    "question_intro": null,
    "question_text": "Have you ever felt annoyed by criticism of your drinking?",
    "options": [],
    "source_page": 0,
    "instrument_id": null,
    "instrument_name": null,
    "topics_auto": null,
    "topics_strengths": null,
    "nearest_match_from_mhc_auto": null
  }
}
ronnyTodgers commented 8 months ago

Looks perfect to me.

ronnyTodgers commented 6 months ago

Fixed in staging https://github.com/harmonydata/app/commit/947c727ed5fd547263d663b2262735743eb56ca3

Currently taking the cutoff from the main threshold slider - but perhaps it should be static at ~60%?