# Exploration in association between vitamin D and cutaneous melanoma and explainable machine learning prediction

**Authors:** Lingyi Li, Man Luo

PMC · DOI: 10.3389/fonc.2025.1503611 · Frontiers in Oncology · 2025-05-08

## TL;DR

This study finds that higher vitamin D levels are linked to lower melanoma risk and uses machine learning to predict melanoma with high accuracy.

## Contribution

The study introduces an explainable XGBoost model for melanoma prediction and explores vitamin D's protective role using a large, nationally representative dataset.

## Key findings

- Higher vitamin D levels were associated with significantly reduced melanoma risk across multiple quartiles.
- The XGBoost model achieved an AUC of 0.906, with vitamin D being a key contributor to melanoma prediction.
- Women and younger individuals showed greater protective effects from high vitamin D levels against melanoma.

## Abstract

This study aims to examine association between vitamin D with melanoma and develop an explainable machine learning model.

For this study, relevant data were downloaded from the CDC’s National Health and Nutrition Examination Survey (NHANES) program, for the three survey cycles 2011-2012, 2013–2014 and 2015-2016. Self-reported melanoma data, serum vitamin D levels, and other covariates were downloaded and analyzed. Analysis of variance in this study was performed using t-tests and chi-square tests, modelling was performed using logistic regression based on NHANES weights, and other risk factors were analyzed using forest plots. Ten machine learning models were compared and XGboost was selected for the melanoma prediction.

In this study, logistic regression analysis revealed a protective effect of higher vitamin D levels in melanoma, the ORs were much less than 1 for Q2 (OR=0.97, 95% CI (0.44, 0.98)), Q3 (OR=0.71, 95% CI (0.65, 0.92)), and Q4 (OR=0.32, 95% CI (0.55, 0.81)). Meanwhile, forest plot analysis showed that vitamin D, the number of sunburns in the past year, advanced age, Caucasian, education some college, single and unmarried, smoking, diabetes and hypertension, were all statistically significant. The OR was higher in men than in women, with Q4 values of 0.31 (95% CI: 0.18–0.51) for men and 0.29 (95% CI: 0.15–0.45) for women. OR was higher in the senior patients than in the non-senior group, with Q4 (OR=0.53, 95% CI (0.23, 0.73)). An explainable XGBoost model had AUC 0.906, and in the model vitamin D had main contribution to the model.

In conclusion, this study concluded that vitamin D decreases melanoma risk based on a larger sample and multi-covariate analysis. Female and young people received high protection from vitamin D in melanoma. XGBoost can accurately prediction the possibility of melanoma based on vitamin D.

## Linked entities

- **Diseases:** melanoma (MONDO:0005105), diabetes (MONDO:0005015)

## Full-text entities

- **Diseases:** cutaneous melanoma (MESH:C562393), diabetes (MESH:D003920), hypertension (MESH:D006973), melanoma (MESH:D008545)
- **Chemicals:** vitamin D (MESH:D014807)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12117584/full.md

## Figures

6 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12117584/full.md

## References

36 references — full list in the complete paper: https://tomesphere.com/paper/PMC12117584/full.md

---
Source: https://tomesphere.com/paper/PMC12117584