{"id":69,"date":"2026-10-02T17:27:52","date_gmt":"2026-10-02T16:27:52","guid":{"rendered":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/?p=69"},"modified":"2026-10-02T17:27:53","modified_gmt":"2026-10-02T16:27:53","slug":"using-ai-to-explore-osteoporosis-risk-my-msc-dissertation-journey","status":"publish","type":"post","link":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/2026\/10\/02\/using-ai-to-explore-osteoporosis-risk-my-msc-dissertation-journey\/","title":{"rendered":"Using AI to Explore Osteoporosis Risk: My MSc Dissertation Journey"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When I started my MSc in Computer Science and Artificial Intelligence at the University of York, I knew I wanted my dissertation to sit at the intersection of technology and healthcare. With a background in neuroscience and a current interest in medicine, I was particularly interested in exploring how artificial intelligence could be used to address real clinical problems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">My dissertation focused on osteoporosis risk in post-menopausal women, asking whether machine learning could identify people at higher risk using information that is relatively simple and non-invasive to collect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>From a clinical problem to a machine learning project<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Osteoporosis is a major cause of fragility fractures, particularly in post-menopausal women. Although bone mineral density can be measured accurately using DXA scanning, providing this type of assessment to everyone is resource-intensive.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I therefore wanted to explore whether machine learning could help with the triage process: could we use information such as age, BMI, lifestyle factors and other health characteristics to identify people who may benefit from further assessment?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the project, I used data from the National Health and Nutrition Examination Survey (NHANES), combining demographic, examination and questionnaire data with DXA-derived bone mineral density measurements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I compared three different machine learning approaches: Logistic Regression, Random Forest and XGBoost.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One of the biggest challenges I encountered was class imbalance. Most participants did not meet my osteoporosis-risk threshold, meaning that a model could appear to perform well while actually missing a large proportion of the people I was most interested in identifying.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than using synthetic data to artificially increase the minority class, I explored cost-sensitive learning, giving greater weight to missed osteoporosis cases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The results were particularly interesting. The baseline models had reasonably strong overall discrimination, but their ability to identify osteoporosis cases was poor. After cost-sensitive optimisation, the targeted Random Forest model achieved 100% recall, while maintaining a precision of 58.9% and an F1-score of 0.741. I also found that age and BMI consistently emerged as the most important predictors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Perhaps the most interesting finding was that the effect of training on a specific population depended on the machine learning architecture. Training Random Forest on the general population substantially reduced its ability to identify osteoporosis cases, whereas XGBoost maintained high sensitivity but became less precise. This suggested that demographic stratification is not necessarily a universal requirement, but rather something that needs to be considered alongside the architecture and intended use of a model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, these results are exploratory. The dataset was enriched for people who had undergone DXA assessment, and the models would require external validation and calibration before they could ever be considered for clinical use.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What I learned from doing an MSc dissertation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The biggest lesson I took away from the project is that a good machine learning project is not necessarily about building the most complicated model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is very easy to become focused on algorithms, hyperparameters and performance scores. However, I found that some of the most important decisions happened before the model was even trained: choosing an appropriate dataset, defining the target carefully, understanding the limitations of the data and deciding which performance metric actually mattered for the problem. My <a href=\"https:\/\/www.linkedin.com\/in\/dr-seema-jehan\/\">supervisor\u2019s<\/a> constructive feedback made navigating these crucial analytical decisions significantly easier.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>My advice for future students<\/strong>:<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Choose your research question before choosing your model.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is tempting to start with a technique you want to try. XGBoost, neural networks, deep learning, and so on, and then find a problem for it. I found it much more useful to start with the problem and ask what type of model and evaluation strategy actually made sense.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Spend more time understanding your dataset than you think you need to.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This was probably one of the most valuable parts of my dissertation. Understanding how the data had been collected, what was missing, how variables had been measured and who was represented in the dataset affected almost every subsequent decision.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">A sophisticated model cannot compensate for poorly understood data.<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Don&#8217;t rely on a single performance metric.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">My project really demonstrated how misleading a single metric can be. A model can have a strong AUC while still missing a large proportion of the cases you actually care about. Think carefully about what a false positive and false negative mean for your particular problem.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Keep your project reproducible from the beginning.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Save your code, datasets, model versions, outputs and decisions as you go. Don&#8217;t assume you&#8217;ll remember why you made a particular decision several months later, especially when you&#8217;re trying to write everything up at the end!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Start writing earlier than you think you need to.<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I initially thought I needed to finish the analysis before I could properly start writing. In reality, writing helped me identify gaps in my reasoning and clarify what I was actually trying to demonstrate. Your dissertation is not just a report of what you did; it is an argument for why what you did matters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Looking back<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Completing the MSc has given me much more than experience with machine learning. It has taught me how to approach an unfamiliar problem, critically evaluate evidence, work with imperfect real-world data and think about the implications of applying technology in healthcare.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Coming from a neuroscience background and moving into computer science, I found the MSc challenging at times, but that combination of disciplines ultimately became one of the most valuable parts of the experience.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">My biggest takeaway is simple: you don&#8217;t need to know everything before you start. You need to be willing to investigate, question your assumptions and keep refining the problem as you learn more.<\/p>\n<\/blockquote>\n\n\n\n<ul class=\"wp-block-social-links is-layout-flex wp-block-social-links-is-layout-flex\"><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I started my MSc in Computer Science and Artificial Intelligence at the University of York, I knew I wanted my dissertation to sit at the intersection of technology and healthcare. With a background in neuroscience and a current interest in medicine, I was particularly interested in exploring how artificial intelligence could be used to [&hellip;]<\/p>\n","protected":false},"author":291,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4,5],"tags":[22,21,23,20,25,26,24],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-artificial-intelligence","category-machine-learning","tag-bmd","tag-dxa","tag-logistic-regression","tag-nhanes","tag-random-forest","tag-shap","tag-xgboost"],"acf":[],"uoy_author":{"name":"natashasinha","bio":"Natasha is a third year medical student at St George's University of London. She holds a BSc in Neuroscience from the University of Leeds (2020) and recently completed an MSc in Computer Science with AI at the University of York (2026). Her academic path across neuroscience, AI and medicine has shaped a particular interest in medical AI and how it can be applied within healthcare. This interdisciplinary grounding allows her to engage critically with both the clinical and computational dimensions of AI, and with the evidence base required to translate such tools into safe and effective clinical practice.","image":{"src":"https:\/\/secure.gravatar.com\/avatar\/?s=200&d=mm&r=g","width":200,"height":200,"alt":""}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/users\/291"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":11,"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":91,"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/posts\/69\/revisions\/91"}],"wp:attachment":[{"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.york.ac.uk\/computer-science-online-showcase\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}