Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation

Abstract BackgroundSpirometry can be performed in an office setting or remotely using portable spirometers. Although basic spirometry is used for diagnosis of obstructive lung disease, clinically relevant information such as restriction, hyperinflation, and air trapping requir...

Full description

Saved in:
Bibliographic Details
Main Authors: Scott A Helgeson, Zachary S Quicksall, Patrick W Johnson, Kaiser G Lim, Rickey E Carter, Augustine S Lee
Format: Article
Language:English
Published: JMIR Publications 2025-03-01
Series:JMIR AI
Online Access:https://ai.jmir.org/2025/1/e65456
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849708703178031104
author Scott A Helgeson
Zachary S Quicksall
Patrick W Johnson
Kaiser G Lim
Rickey E Carter
Augustine S Lee
author_facet Scott A Helgeson
Zachary S Quicksall
Patrick W Johnson
Kaiser G Lim
Rickey E Carter
Augustine S Lee
author_sort Scott A Helgeson
collection DOAJ
description Abstract BackgroundSpirometry can be performed in an office setting or remotely using portable spirometers. Although basic spirometry is used for diagnosis of obstructive lung disease, clinically relevant information such as restriction, hyperinflation, and air trapping require additional testing, such as body plethysmography, which is not as readily available. We hypothesize that spirometry data contains information that can allow estimation of static lung volumes in certain circumstances by leveraging machine learning techniques. ObjectiveThe aim of the study was to develop artificial intelligence-based algorithms for estimating lung volumes and capacities using spirometry measures. MethodsThis study obtained spirometry and lung volume measurements from the Mayo Clinic pulmonary function test database for patient visits between February 19, 2001, and December 16, 2022. Preprocessing was performed, and various machine learning algorithms were applied, including a generalized linear model with regularization, random forests, extremely randomized trees, gradient-boosted trees, and XGBoost for both classification and regression cohorts. ResultsA total of 121,498 pulmonary function tests were used in this study, with 85,017 allotted for exploratory data analysis and model development (ie, training dataset) and 36,481 tests reserved for model evaluation (ie, testing dataset). The median age of the cohort was 64.7 years (IQR 18‐119.6), with a balanced distribution between genders, consisting 48.2% (n=58,607) female and 51.8% (n=62,889) male patients. The classification models showed a robust performance overall, with relatively low root mean square error and mean absolute error values observed across all predicted lung volumes. Across all lung volume categories, the models demonstrated strong discriminatory capacity, as indicated by the high area under the receiver operating characteristic curve values ranging from 0.85 to 0.99 in the training set and 0.81 to 0.98 in the testing set. ConclusionsOverall, the models demonstrate robust performance across lung volume measurements, underscoring their potential utility in clinical practice for accurate diagnosis and prognosis of respiratory conditions, particularly in settings where access to body plethysmography or other lung volume measurement modalities is limited.
format Article
id doaj-art-73a1b06e33f749869f96a4f1f224d237
institution DOAJ
issn 2817-1705
language English
publishDate 2025-03-01
publisher JMIR Publications
record_format Article
series JMIR AI
spelling doaj-art-73a1b06e33f749869f96a4f1f224d2372025-08-20T03:15:34ZengJMIR PublicationsJMIR AI2817-17052025-03-014e65456e6545610.2196/65456Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and ValidationScott A Helgesonhttp://orcid.org/0000-0001-7590-2293Zachary S Quicksallhttp://orcid.org/0000-0002-8791-0925Patrick W Johnsonhttp://orcid.org/0000-0001-8365-1375Kaiser G Limhttp://orcid.org/0000-0002-4551-6559Rickey E Carterhttp://orcid.org/0000-0002-0818-273XAugustine S Leehttp://orcid.org/0000-0001-8018-5145 Abstract BackgroundSpirometry can be performed in an office setting or remotely using portable spirometers. Although basic spirometry is used for diagnosis of obstructive lung disease, clinically relevant information such as restriction, hyperinflation, and air trapping require additional testing, such as body plethysmography, which is not as readily available. We hypothesize that spirometry data contains information that can allow estimation of static lung volumes in certain circumstances by leveraging machine learning techniques. ObjectiveThe aim of the study was to develop artificial intelligence-based algorithms for estimating lung volumes and capacities using spirometry measures. MethodsThis study obtained spirometry and lung volume measurements from the Mayo Clinic pulmonary function test database for patient visits between February 19, 2001, and December 16, 2022. Preprocessing was performed, and various machine learning algorithms were applied, including a generalized linear model with regularization, random forests, extremely randomized trees, gradient-boosted trees, and XGBoost for both classification and regression cohorts. ResultsA total of 121,498 pulmonary function tests were used in this study, with 85,017 allotted for exploratory data analysis and model development (ie, training dataset) and 36,481 tests reserved for model evaluation (ie, testing dataset). The median age of the cohort was 64.7 years (IQR 18‐119.6), with a balanced distribution between genders, consisting 48.2% (n=58,607) female and 51.8% (n=62,889) male patients. The classification models showed a robust performance overall, with relatively low root mean square error and mean absolute error values observed across all predicted lung volumes. Across all lung volume categories, the models demonstrated strong discriminatory capacity, as indicated by the high area under the receiver operating characteristic curve values ranging from 0.85 to 0.99 in the training set and 0.81 to 0.98 in the testing set. ConclusionsOverall, the models demonstrate robust performance across lung volume measurements, underscoring their potential utility in clinical practice for accurate diagnosis and prognosis of respiratory conditions, particularly in settings where access to body plethysmography or other lung volume measurement modalities is limited.https://ai.jmir.org/2025/1/e65456
spellingShingle Scott A Helgeson
Zachary S Quicksall
Patrick W Johnson
Kaiser G Lim
Rickey E Carter
Augustine S Lee
Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation
JMIR AI
title Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation
title_full Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation
title_fullStr Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation
title_full_unstemmed Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation
title_short Estimation of Static Lung Volumes and Capacities From Spirometry Using Machine Learning: Algorithm Development and Validation
title_sort estimation of static lung volumes and capacities from spirometry using machine learning algorithm development and validation
url https://ai.jmir.org/2025/1/e65456
work_keys_str_mv AT scottahelgeson estimationofstaticlungvolumesandcapacitiesfromspirometryusingmachinelearningalgorithmdevelopmentandvalidation
AT zacharysquicksall estimationofstaticlungvolumesandcapacitiesfromspirometryusingmachinelearningalgorithmdevelopmentandvalidation
AT patrickwjohnson estimationofstaticlungvolumesandcapacitiesfromspirometryusingmachinelearningalgorithmdevelopmentandvalidation
AT kaiserglim estimationofstaticlungvolumesandcapacitiesfromspirometryusingmachinelearningalgorithmdevelopmentandvalidation
AT rickeyecarter estimationofstaticlungvolumesandcapacitiesfromspirometryusingmachinelearningalgorithmdevelopmentandvalidation
AT augustineslee estimationofstaticlungvolumesandcapacitiesfromspirometryusingmachinelearningalgorithmdevelopmentandvalidation