Background: Detection of colorectal cancer (CRC) is mainly achieved by clinical assessment. As new treatments become available for metastatic CRC (MCRC), it is important to accurately identify these patients.
Aim: To develop a predictive model for identifying MCRC in primary health care patients using diagnostic data analysed with machine learning.
Design and setting: A case-control study utilising data on primary health care visits for 146 patients >18 years old diagnosed with MCRC in the Västra Götaland Region, Sweden during 2011, and 577 sex-, age, and primary health care centre-matched controls.
Method: Stochastic gradient boosting was used to construct a model for predicting the presence of MCRC based on diagnostic codes from primary health care consultations during the year before index (diagnosis) date and number of consultations. Variable importance was estimated using the normalised relative influence (NRI) score. Risks of having MCRC were calculated using odds ratios of marginal effects (ORME).
Results: The optimal model included 76 variables with non-zero influence, had an area under the curve of 76.5%, a sensitivity of 77.8%, and a specificity of 69.2%. The 10 most important variables had a combined NRI of 61.0%. Number of consultations during the year before index date had the highest NRI at 19.2%, with an ORME of 3.3.
Conclusion: A machine learning method based on primary health care consultation frequency and diagnoses may be used to identify important variables for predicting presence of MCRC. Both primary health care consultations and associated diagnostic codes need to be taken into consideration.
Taylor & Francis, 2025.
artificial intelligence, cancer detection, family practice, gradient boosting, colorectal neoplasms